Require th-abstraction >= 0.6 (#172)

This commit is contained in:
Andrzej Rybczak 2023-07-31 15:31:26 +02:00 committed by GitHub
parent 2b0358ba59
commit 1b4e90728e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 15 deletions

View File

@ -205,16 +205,11 @@ jobs:
echo "package effectful" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: freer-simple:template-haskell
allow-newer: async:base
allow-newer: cleff:base
allow-newer: cleff:template-haskell
allow-newer: fused-effects:base
allow-newer: fused-effects:transformers
allow-newer: hashable:base
allow-newer: hashable:ghc-prim
allow-newer: polysemy:transformers
allow-newer: unliftio-core:base
allow-newer: cleff:th-abstraction
allow-newer: freer-simple:template-haskell
allow-newer: polysemy:th-abstraction
package effectful
flags: +benchmark-foreign-libraries

View File

@ -4,7 +4,8 @@ packages:
effectful-th/*.cabal
effectful/*.cabal
-- GHC 9.4 & 9.6
allow-newer: cleff:base
, cleff:template-haskell
, cleff:th-abstraction
, freer-simple:template-haskell
, polysemy:th-abstraction

View File

@ -59,7 +59,7 @@ library
, effectful-core >= 1.0.0.0 && < 3.0.0.0
, exceptions >= 0.10.4
, template-haskell >= 2.15 && < 2.21
, th-abstraction >= 0.4 && < 0.7
, th-abstraction >= 0.6 && < 0.7
hs-source-dirs: src

View File

@ -168,11 +168,7 @@ makeCon makeSig name = do
--
-- Sadly the version for GHC < 9 will not compile due to ambiguity error.
let fnBody =
let tvFlag = \case
PlainTV _ flag -> flag
KindedTV _ flag _ -> flag
tyApps = (`mapMaybe` origActionVars) $ \v -> case tvFlag v of
let tyApps = (`mapMaybe` origActionVars) $ \v -> case tvFlag v of
InferredSpec -> Nothing
SpecifiedSpec -> Just $ if maybeMonadName == Just (tvName v)
then ConT ''Eff `AppT` esVar