Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dtypes.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,7 +49,7 @@ test-suite dtypes-th
build-depends:
base,
dtypes,
template-haskell,
template-haskell > 2.17.0.0,
HTF,
safe,
transformers
Expand Down
6 changes: 3 additions & 3 deletions src/DTypes/Internal/TH/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/DTypes/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -149,7 +149,7 @@ getSimpleConstrInfo con =
data SimpleTypeInfo
= SimpleTypeInfo
{ stdi_typeName :: Name
, stdi_typeArgs :: [TyVarBndr]
, stdi_typeArgs :: [TyVarBndrUnit]
, stdi_constrs :: [SimpleConstrInfo]
} deriving (Show)

Expand Down