Skip to content

Commit

Permalink
support ghc9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kgtkr committed Sep 11, 2024
1 parent 10eb819 commit 0bfa06f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions extensible-skeleton/src/Data/Extensible/Effect/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ customDecEffects synSet synActions decs = decs >>= \ds -> fmap concat $ forM ds
++ concat dcs
_ -> fail "mkEffects accepts GADT declaration"
where
#if MIN_VERSION_template_haskell(2,17,0)
#if MIN_VERSION_template_haskell(2,21,0)
mkPlainTV n = PlainTV n BndrReq
#elif MIN_VERSION_template_haskell(2,17,0)
mkPlainTV n = PlainTV n ()
#else
mkPlainTV = PlainTV
#endif

#if MIN_VERSION_template_haskell(2,17,0)
#if MIN_VERSION_template_haskell(2,21,0)
con2Eff :: [TyVarBndr BndrVis] -> Con -> Q ((Name, Type), [Dec])
#elif MIN_VERSION_template_haskell(2,17,0)
con2Eff :: [TyVarBndr ()] -> Con -> Q ((Name, Type), [Dec])
#else
con2Eff :: [TyVarBndr] -> Con -> Q ((Name, Type), [Dec])
Expand All @@ -90,7 +94,9 @@ con2Eff _ p = do
runIO (print p)
fail "Unsupported constructor"

#if MIN_VERSION_template_haskell(2,17,0)
#if MIN_VERSION_template_haskell(2,21,0)
fromMangledGADT :: [TyVarBndr BndrVis] -> [Type] -> Name -> [(Strict, Type)] -> ((Name, Type), [Dec])
#elif MIN_VERSION_template_haskell(2,17,0)
fromMangledGADT :: [TyVarBndr ()] -> [Type] -> Name -> [(Strict, Type)] -> ((Name, Type), [Dec])
#else
fromMangledGADT :: [TyVarBndr] -> [Type] -> Name -> [(Strict, Type)] -> ((Name, Type), [Dec])
Expand Down
2 changes: 1 addition & 1 deletion extensible.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ library
, CPP
, NoStarIsType
build-depends: base >= 4.8 && <5
, aeson >= 1.5 && <2.2
, aeson >= 1.5 && <2.3
, bytestring
, comonad
, constraints
Expand Down

0 comments on commit 0bfa06f

Please sign in to comment.