Skip to content

Commit

Permalink
Compatibility fix with GHC 9.8
Browse files Browse the repository at this point in the history
Thanks @noahmartinwilliams!

Closes #541
  • Loading branch information
tomsmeding committed Apr 9, 2024
1 parent 334d055 commit d332735
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion accelerate.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ flag nofib

library
build-depends:
base >= 4.12 && < 4.19
base >= 4.12 && < 4.20
, ansi-terminal >= 0.6.2
, base-orphans >= 0.3
, bytestring >= 0.10.2
Expand Down
8 changes: 4 additions & 4 deletions src/Data/Array/Accelerate/Pattern/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ mkDec dec =
NewtypeD _ nm tv _ c _ -> mkNewtypeD nm tv c
_ -> fail "mkPatterns: expected the name of a newtype or datatype"

mkNewtypeD :: Name -> [TyVarBndr ()] -> Con -> DecsQ
mkNewtypeD :: Name -> [TyVarBndr a] -> Con -> DecsQ
mkNewtypeD tn tvs c = mkDataD tn tvs [c]

mkDataD :: Name -> [TyVarBndr ()] -> [Con] -> DecsQ
mkDataD :: Name -> [TyVarBndr a] -> [Con] -> DecsQ
mkDataD tn tvs cs = do
(pats, decs) <- unzip <$> go cs
comp <- pragCompleteD pats Nothing
Expand Down Expand Up @@ -122,7 +122,7 @@ mkDataD tn tvs cs = do
map bitsToTag (l ++ r)


mkConP :: Name -> [TyVarBndr ()] -> Con -> Q (Name, [Dec])
mkConP :: Name -> [TyVarBndr a] -> Con -> Q (Name, [Dec])
mkConP tn' tvs' con' = do
checkExts [ PatternSynonyms ]
case con' of
Expand Down Expand Up @@ -192,7 +192,7 @@ mkConP tn' tvs' con' = do
[t| Exp $(foldl' appT (conT tn) (map varT tvs)) |]
(map (\t -> [t| Exp $(return t) |]) fs))

mkConS :: Name -> [TyVarBndr ()] -> [[Type]] -> [[Type]] -> Word8 -> Con -> Q (Name, [Dec])
mkConS :: Name -> [TyVarBndr a] -> [[Type]] -> [[Type]] -> Word8 -> Con -> Q (Name, [Dec])
mkConS tn' tvs' prev' next' tag' con' = do
checkExts [GADTs, PatternSynonyms, ScopedTypeVariables, TypeApplications, ViewPatterns]
case con' of
Expand Down

0 comments on commit d332735

Please sign in to comment.