Skip to content

Commit 834154f

Browse files
committed
Appease hlint
1 parent 72e620b commit 834154f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Hint/All.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ builtin x = case x of
7474
wrap = timed "Hint" (drop 4 $ show x) . forceList
7575
decl f = mempty{hintDecl=const $ \a b c -> wrap $ f a b c}
7676
modu f = mempty{hintModule=const $ \a b -> wrap $ f a b}
77-
mods f = mempty{hintModules=const $ \a -> wrap $ f a}
77+
mods f = mempty{hintModules=const $ wrap . f}
7878

7979
-- | A list of builtin hints, currently including entries such as @\"List\"@ and @\"Bracket\"@.
8080
builtinHints :: [(String, Hint)]

src/Hint/Monad.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ monadExp decl parentDo parentExpr x =
135135
_ -> []
136136
where
137137
f = monadNoResult (fromMaybe "" decl) id
138-
seenVoid wrap (L l (HsPar x y)) = seenVoid (wrap . L l . \y -> HsPar x y) y
138+
seenVoid wrap (L l (HsPar x y)) = seenVoid (wrap . L l . HsPar x) y
139139
seenVoid wrap x =
140140
-- Suggest `traverse_ f x` given `void $ traverse_ f x`
141141
[warn "Redundant void" (reLoc (wrap x)) (reLoc x) [Replace Expr (toSSA (wrap x)) [("a", toSSA x)] "a"] | returnsUnit x]
@@ -189,7 +189,7 @@ modifyAppHead :: forall a. (LIdP GhcPs -> (LIdP GhcPs, a)) -> LHsExpr GhcPs -> (
189189
modifyAppHead f = go id
190190
where
191191
go :: (LHsExpr GhcPs -> LHsExpr GhcPs) -> LHsExpr GhcPs -> (LHsExpr GhcPs, Maybe a)
192-
go wrap (L l (HsPar _ x)) = go (wrap . L l . \y -> HsPar noAnn y) x
192+
go wrap (L l (HsPar _ x)) = go (wrap . L l . HsPar noAnn) x
193193
go wrap (L l (HsApp _ x y)) = go (\x -> wrap $ L l (HsApp noExtField x y)) x
194194
go wrap (L l (OpApp _ x op y)) | isDol op = go (\x -> wrap $ L l (OpApp noExtField x op y)) x
195195
go wrap (L l (HsVar _ x)) = (wrap (L l (HsVar NoExtField x')), Just a)

0 commit comments

Comments
 (0)