Skip to content

Commit

Permalink
chore: fourmolu 0.16.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Hess <[email protected]>
  • Loading branch information
dhess committed Jul 17, 2024
1 parent 41a7cae commit e7be104
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

# Fourmolu updates often alter formatting arbitrarily, and we want to
# have more control over this.
fourmoluVersion = "0.15.0.0";
fourmoluVersion = "0.16.2.0";

allOverlays = [
inputs.haskell-nix.overlay
Expand Down
11 changes: 6 additions & 5 deletions primer/src/Primer/Core/Transform.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ renameVar x y expr = case expr of
APP{} -> substAllChildren
Con{} -> substAllChildren
PrimCon{} -> substAllChildren
-- We assume the term is well-scoped, so do not have any references to the
-- term vars x,y inside any type child (e.g. annotation), so no need to
-- consider renaming inside them. However, but we do need to worry about
-- references to the type var y (term and type variables are in the same
-- namespace) -- we do not want to capture such a y.
where
-- We assume the term is well-scoped, so do not have any references to the
-- term vars x,y inside any type child (e.g. annotation), so no need to
-- consider renaming inside them. However, but we do need to worry about
-- references to the type var y (term and type variables are in the same
-- namespace) -- we do not want to capture such a y.

substAllChildren = do
guard $ noneOf (typesInExpr % getting _freeVarsTy % _2) (`sameVarRef` y) expr
descendM (renameVar x y) expr
Expand Down
3 changes: 1 addition & 2 deletions primer/src/Primer/Examples.hs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ comprehensive' typeable modName = do
( hole
(con B.cJust [emptyHole] `ann` (tcon B.tMaybe `tapp` tEmptyHole))
)
( if typeable then emptyHole else hole $ gvar' (unModuleName modName) "unboundName"
)
(if typeable then emptyHole else hole $ gvar' (unModuleName modName) "unboundName")
)
( thole
(tcon B.tMaybe)
Expand Down
9 changes: 3 additions & 6 deletions primer/test/Tests/Action/Available.hs
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,7 @@ genLoc a = do
[
( 1
, pure
( typeDefParamNodeSel Nothing
)
(typeDefParamNodeSel Nothing)
)
,
( 3
Expand All @@ -599,8 +598,7 @@ genLoc a = do
KFun m k1 k2 -> [getID m] <> allKindIDs k1 <> allKindIDs k2
id <- Gen.element @[] $ allKindIDs k
pure
( typeDefParamNodeSel $ Just id
)
(typeDefParamNodeSel $ Just id)
)
]
)
Expand All @@ -622,8 +620,7 @@ genLoc a = do
(n, t) <- Gen.element $ zip [0 ..] as
i <- Gen.element $ t ^.. typeIDs
pure
( typeDefConsNodeSel . Just $ TypeDefConsFieldSelection n i
)
(typeDefConsNodeSel . Just $ TypeDefConsFieldSelection n i)
)
]
)
Expand Down
15 changes: 5 additions & 10 deletions primer/test/Tests/Action/Prog.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,7 @@ unit_ConFieldAction =
unit_ParamKindAction_1 :: Assertion
unit_ParamKindAction_1 =
progActionTest
( defaultProgEditableTypeDefs (pure [])
)
(defaultProgEditableTypeDefs (pure []))
[ParamKindAction tT pB [SetCursor 45, ConstructKFun]]
$ expectSuccess
$ \_ prog' -> do
Expand All @@ -1327,8 +1326,7 @@ unit_ParamKindAction_1 =
unit_ParamKindAction_2 :: Assertion
unit_ParamKindAction_2 =
progActionTest
( defaultProgEditableTypeDefs (pure [])
)
(defaultProgEditableTypeDefs (pure []))
[ ParamKindAction tT pB [SetCursor 45, ConstructKFun]
, ParamKindAction tT pB [SetCursor 51, ConstructKType]
]
Expand All @@ -1337,8 +1335,7 @@ unit_ParamKindAction_2 =
unit_ParamKindAction_2b :: Assertion
unit_ParamKindAction_2b =
progActionTest
( defaultProgEditableTypeDefs (pure [])
)
(defaultProgEditableTypeDefs (pure []))
[ ParamKindAction tT pB [SetCursor 45, ConstructKFun]
, ParamKindAction tT pB [SetCursor 51, Delete]
]
Expand All @@ -1353,8 +1350,7 @@ unit_ParamKindAction_2b =
unit_ParamKindAction_3 :: Assertion
unit_ParamKindAction_3 =
progActionTest
( defaultProgEditableTypeDefs (pure [])
)
(defaultProgEditableTypeDefs (pure []))
[ ParamKindAction tT pA [SetCursor 44, Delete]
]
$ expectSuccess
Expand All @@ -1368,8 +1364,7 @@ unit_ParamKindAction_3 =
unit_ParamKindAction_bad_id :: Assertion
unit_ParamKindAction_bad_id =
progActionTest
( defaultProgEditableTypeDefs (pure [])
)
(defaultProgEditableTypeDefs (pure []))
[ ParamKindAction tT pB [SetCursor 45, ConstructKFun]
, ParamKindAction tT pB [SetCursor 0, ConstructKType]
]
Expand Down
6 changes: 3 additions & 3 deletions primer/test/Tests/Shadowing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ unit_shadow_no_reused_binders =
e0 <-
( lam "f" (lvar "f" `app` lvar "f")
`ann` ((tEmptyHole `tfun` tEmptyHole) `tfun` tEmptyHole)
)
)
`app` lam "g" (lam "y" $ lvar "g" `app` lvar "y")
e4 <-
( let_
Expand All @@ -98,7 +98,7 @@ unit_shadow_no_reused_binders =
)
(lam "y" $ lvar "g" `app` lvar "y")
`ann` tEmptyHole
)
)
`ann` tEmptyHole
let z = "a88"
e5 <-
Expand All @@ -112,7 +112,7 @@ unit_shadow_no_reused_binders =
)
(lam z $ let_ "y" (lvar z) $ lvar "g" `app` lvar "y")
`ann` tEmptyHole
)
)
`ann` tEmptyHole
pure (e0, [(0, e0), (4, e4), (5, e5)])
in do
Expand Down

1 comment on commit e7be104

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Primer benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: e7be104 Previous: 41a7cae Ratio
evalTestM/pure logs/mapEven 10: outlier variance 0.37502196265805116 outlier variance 0.16657571116727135 outlier variance 2.25
typecheck/mapOddPrim 1: outlier variance 0.3723656052797939 outlier variance 0.14751610094624137 outlier variance 2.52

This comment was automatically generated by workflow using github-action-benchmark.

CC: @dhess

Please sign in to comment.