clean-up: m upd: minor tweaks, dropped functor
This commit is contained in:
parent
6fa53d711b
commit
003dcb660b
|
@ -385,7 +385,7 @@ pruneTree opts = foldFixM $ \(FlaggedF (b, Compose x)) -> do
|
|||
pruneParams (Param n) = Param n
|
||||
pruneParams (ParamSet xs b n)
|
||||
| reduceSets opts = ParamSet
|
||||
(map (second (maybe (Just nNull) Just . fmap (fromMaybe nNull))) xs)
|
||||
(map (second (maybe (Just nNull) (Just . fromMaybe nNull))) xs)
|
||||
b
|
||||
n
|
||||
| otherwise = ParamSet (map (second (fmap (fromMaybe nNull))) xs) b n
|
||||
|
|
|
@ -118,12 +118,12 @@ sourceContext path (unPos -> begLine) (unPos -> _begCol) (unPos -> endLine) (unP
|
|||
. T.decodeUtf8
|
||||
<$> readFile path
|
||||
let
|
||||
nums = map (show . fst) $ zip [beg' ..] ls
|
||||
nums = zipWith (curry (show . fst)) [beg' ..] ls
|
||||
longest = maximum (map length nums)
|
||||
nums' = flip map nums $ \n -> replicate (longest - length n) ' ' ++ n
|
||||
pad n | read n == begLine = "==> " ++ n
|
||||
| otherwise = " " ++ n
|
||||
ls' = zipWith (<+>)
|
||||
(map (pretty . pad) nums')
|
||||
(zipWith (<+>) (repeat "| ") ls)
|
||||
(map ((<+>) "| ") ls)
|
||||
pure $ vsep $ ls' ++ [msg]
|
||||
|
|
Loading…
Reference in New Issue