From 31ccadfca2541c65676b338a46aa3a817dd345bf Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Mon, 25 Sep 2023 16:17:08 +1000 Subject: [PATCH] Make version 0.1.1.1 compile with ghc-9.8 The `plutus-core` package currently has: ``` , dependent-sum >=0.7.1.0 , dependent-sum-template <0.1.2 ``` This commit takes the commit that was tagged as version 0.1.1.1 and fixes it for ghc-9.8. See: https://github.com/obsidiansystems/dependent-sum-template/issues/9 --- src/Data/Dependent/Sum/TH/Internal.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Data/Dependent/Sum/TH/Internal.hs b/src/Data/Dependent/Sum/TH/Internal.hs index a784d10..1d4887c 100644 --- a/src/Data/Dependent/Sum/TH/Internal.hs +++ b/src/Data/Dependent/Sum/TH/Internal.hs @@ -28,7 +28,13 @@ classHeadToParams t = (h, reverse reversedParams) deriveForDec :: Name -> (Q Type -> Q Type) -> ([TyVarBndrSpec] -> [Con] -> Q Dec) -> Dec -> Q [Dec] deriveForDec className makeClassHead f dec = deriveForDec' className makeClassHead (f . changeTVFlags specifiedSpec) dec -deriveForDec' :: Name -> (Q Type -> Q Type) -> ([TyVarBndrUnit] -> [Con] -> Q Dec) -> Dec -> Q [Dec] +deriveForDec' :: Name -> (Q Type -> Q Type) +#if __GLASGOW_HASKELL__ >= 908 + -> ([TyVarBndr BndrVis] -> [Con] -> Q Dec) +#else + -> ([TyVarBndrUnit] -> [Con] -> Q Dec) +#endif + -> Dec -> Q [Dec] deriveForDec' className _ f (InstanceD overlaps cxt classHead decs) = do let (givenClassName, firstParam : _) = classHeadToParams classHead when (givenClassName /= className) $