From 1b4e90728ed9b14e2288f46ebffea0c4545c8ecb Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Mon, 31 Jul 2023 15:31:26 +0200 Subject: [PATCH] Require th-abstraction >= 0.6 (#172) --- .github/workflows/haskell-ci.yml | 11 +++-------- cabal.project | 3 ++- effectful-th/effectful-th.cabal | 2 +- effectful-th/src/Effectful/TH.hs | 6 +----- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 0ac6221..b575d9d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -205,16 +205,11 @@ jobs: echo "package effectful" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <= 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 diff --git a/effectful-th/src/Effectful/TH.hs b/effectful-th/src/Effectful/TH.hs index 047a73c..ce48236 100644 --- a/effectful-th/src/Effectful/TH.hs +++ b/effectful-th/src/Effectful/TH.hs @@ -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