Skip to content

Commit

Permalink
fix for 9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed May 25, 2024
1 parent 67f9f11 commit eac24b8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Polysemy/Internal/TH/Effect.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,22 @@ genFreer should_mk_sigs type_name = do
-- | Generates signature for lifting function and type arguments to apply in
-- its body on effect's data constructor.
genSig :: ConLiftInfo -> [Dec]
genSig cli
= maybe [] (pure . flip InfixD (cliFunName cli)) (cliFunFixity cli)
genSig cli =
infixDecl
++ [ SigD (cliFunName cli) $ quantifyType
$ ForallT [] (member_cxt : cliFunCxt cli)
$ foldArrowTs sem
$ fmap snd
$ cliFunArgs cli
]
where
infixDecl = case cliFunFixity cli of
#if __GLASGOW_HASKELL__ >= 910
Just fixity -> [InfixD fixity NoNamespaceSpecifier (cliFunName cli)]
#else
Just fixity -> [InfixD fixity (cliFunName cli)]
#endif
Nothing -> []
member_cxt = makeMemberConstraint (cliUnionName cli) cli
sem = makeSemType (cliUnionName cli) (cliEffRes cli)

Expand Down

0 comments on commit eac24b8

Please sign in to comment.