Skip to content

Commit 003dcb6

Browse files
committed
clean-up: m upd: minor tweaks, dropped functor
1 parent 6fa53d7 commit 003dcb6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Nix/Reduce.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ pruneTree opts = foldFixM $ \(FlaggedF (b, Compose x)) -> do
385385
pruneParams (Param n) = Param n
386386
pruneParams (ParamSet xs b n)
387387
| reduceSets opts = ParamSet
388-
(map (second (maybe (Just nNull) Just . fmap (fromMaybe nNull))) xs)
388+
(map (second (maybe (Just nNull) (Just . fromMaybe nNull))) xs)
389389
b
390390
n
391391
| otherwise = ParamSet (map (second (fmap (fromMaybe nNull))) xs) b n

src/Nix/Render.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ sourceContext path (unPos -> begLine) (unPos -> _begCol) (unPos -> endLine) (unP
118118
. T.decodeUtf8
119119
<$> readFile path
120120
let
121-
nums = map (show . fst) $ zip [beg' ..] ls
121+
nums = zipWith (curry (show . fst)) [beg' ..] ls
122122
longest = maximum (map length nums)
123123
nums' = flip map nums $ \n -> replicate (longest - length n) ' ' ++ n
124124
pad n | read n == begLine = "==> " ++ n
125125
| otherwise = " " ++ n
126126
ls' = zipWith (<+>)
127127
(map (pretty . pad) nums')
128-
(zipWith (<+>) (repeat "| ") ls)
128+
(map ((<+>) "| ") ls)
129129
pure $ vsep $ ls' ++ [msg]

0 commit comments

Comments
 (0)