diff --git a/dtypes.cabal b/dtypes.cabal index e7900f0..2eb1039 100644 --- a/dtypes.cabal +++ b/dtypes.cabal @@ -36,7 +36,7 @@ library DTypes.Internal.TH.Helpers build-depends: base >= 4.7 && < 5, - template-haskell, + template-haskell > 2.17.0.0, transformers >= 0.3 && < 0.6, safe default-language: Haskell2010 @@ -49,7 +49,7 @@ test-suite dtypes-th build-depends: base, dtypes, - template-haskell, + template-haskell > 2.17.0.0, HTF, safe, transformers diff --git a/src/DTypes/Internal/TH/Helpers.hs b/src/DTypes/Internal/TH/Helpers.hs index 509f9b6..02bb38a 100644 --- a/src/DTypes/Internal/TH/Helpers.hs +++ b/src/DTypes/Internal/TH/Helpers.hs @@ -36,11 +36,11 @@ liftAppEs x args = firstArg:nextArgs -> apAppEs [e| $x <$> $firstArg |] nextArgs -- | Extract the name from a TyVarBndr. -nameFromTyVarBndr :: TyVarBndr -> Name +nameFromTyVarBndr :: TyVarBndr a -> Name nameFromTyVarBndr bndr = case bndr of - PlainTV name -> name - KindedTV name _kind -> name + PlainTV name _ -> name + KindedTV name _ _kind -> name -- | Apply arguments to a type constructor. conAppsT :: Name -> [Type] -> Type diff --git a/src/DTypes/TH.hs b/src/DTypes/TH.hs index f3790af..0bf8d02 100644 --- a/src/DTypes/TH.hs +++ b/src/DTypes/TH.hs @@ -96,7 +96,7 @@ makeDTypeForDec dec = functorTyVarName <- newName "f" let kindArrow from to = arrowK `appK` from `appK` to starToStarKind = starK `kindArrow` starK - functorTyVarBndr = KindedTV functorTyVarName starToStarKind + functorTyVarBndr = KindedTV functorTyVarName () starToStarKind return (functorTyVarName, functorTyVarBndr) makeFConForCon :: Name -> Con -> ConQ @@ -149,7 +149,7 @@ getSimpleConstrInfo con = data SimpleTypeInfo = SimpleTypeInfo { stdi_typeName :: Name - , stdi_typeArgs :: [TyVarBndr] + , stdi_typeArgs :: [TyVarBndrUnit] , stdi_constrs :: [SimpleConstrInfo] } deriving (Show)