Skip to content

Commit

Permalink
Follow hlint suggestion: Move brackets to avoid $
Browse files Browse the repository at this point in the history
With hlint-3.8 and after rebasing, I found 3 more suggestions of this kind
  • Loading branch information
philderbeast authored and andreasabel committed Feb 28, 2024
1 parent 3a29d6b commit 4097133
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
- ignore: {name: "Fuse mapM/map"} # 2 hints
- ignore: {name: "Fuse traverse/<$>"} # 2 hints
- ignore: {name: "Hoist not"} # 18 hints
- ignore: {name: "Move brackets to avoid $"} # 3 hints
- ignore: {name: "Move guards forward"} # 2 hints
- ignore: {name: "Redundant $"} # 638 hints
- ignore: {name: "Redundant <$>"} # 51 hints
Expand Down
4 changes: 2 additions & 2 deletions src/full/Agda/Interaction/Options/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,10 +1311,10 @@ transliterateFlag o = return $ o { optTransliterate = True }
withKFlag :: Flag PragmaOptions
withKFlag =
-- with-K is the opposite of --without-K, so collapse default when disabling --without-K
(lensOptWithoutK $ lensCollapseDefault $ const $ pure False)
lensOptWithoutK (lensCollapseDefault $ const $ pure False)
>=>
-- with-K only restores any unsetting of --erased-matches, so keep its default
(lensOptErasedMatches $ lensKeepDefault $ const $ pure True)
lensOptErasedMatches (lensKeepDefault $ const $ pure True)


withoutKFlag :: Flag PragmaOptions
Expand Down
2 changes: 1 addition & 1 deletion src/full/Agda/Mimer/Mimer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ assignMeta metaId term metaType = bench [Bench.CheckRHS] $
dumbUnifier :: Type -> Type -> SM Bool
dumbUnifier t1 t2 = bench [Bench.UnifyIndices] $ do
updateStat incTypeEqChecks
(noConstraints $ equalType t2 t1 >> return True) `catchError` \err -> do
noConstraints (equalType t2 t1 >> return True) `catchError` \err -> do
reportSDoc "mimer.unify" 80 $ do
str <- prettyTCM err
return $ "Unification failed with error:" <+> str
Expand Down

0 comments on commit 4097133

Please sign in to comment.