clean-up: m upd: minor tweaks, dropped functor

This commit is contained in:
Anton-Latukha 2020-09-21 01:50:06 +03:00
parent 6fa53d711b
commit 003dcb660b
No known key found for this signature in database
GPG Key ID: 3D84C07E91802E41
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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]