Commit d8f067c8 authored by Ben Gamari's avatar Ben Gamari 🐢

Add ghc-typelits-natnormalise-0.7.patch

parent 5695bc7e
diff --git a/src/GHC/TypeLits/Normalise.hs b/src/GHC/TypeLits/Normalise.hs
index 5dd94ba..9974b74 100644
index 5dd94ba..0a38706 100644
--- a/src/GHC/TypeLits/Normalise.hs
+++ b/src/GHC/TypeLits/Normalise.hs
@@ -205,8 +205,7 @@ import TcRnTypes
@@ -189,24 +189,34 @@ import TcEvidence (EvTerm (..))
import TcPluginM (zonkCt)
#endif
import TcPluginM (TcPluginM, tcPluginTrace)
-import TcRnTypes (Ct, TcPlugin (..), TcPluginResult(..), ctEvidence, ctEvPred,
- isWanted, mkNonCanonical)
+#if MIN_VERSION_ghc(8,9,0)
+import Predicate (mkClassPred, mkPrimEqPred, classifyPredType, getEqPredTys,
+ Pred (EqPred), EqRel (NomEq))
+import Constraint (Ct, ctEvidence, isWanted, ctEvPred, ctEvLoc, ctLoc, ctLocSpan,
+ CtEvidence (..), CtLoc, TcEvDest (..), isGiven,
+ mkNonCanonical, setCtLoc, setCtLocSpan)
+import Type (Kind, typeKind, eqType, mkTyVarTy, PredType)
+#else
+import TcRnTypes (Ct, ctEvidence, ctEvPred, isWanted, mkNonCanonical,
+ CtEvidence (..), CtLoc, TcEvDest (..), ctEvLoc, ctLoc,
+ ctLocSpan, isGiven,
+ setCtLoc, setCtLocSpan)
import Type (EqRel (NomEq), Kind, PredTree (EqPred), PredType,
- classifyPredType, eqType, getEqPredTys, mkTyVarTy)
+ classifyPredType, eqType, getEqPredTys, mkTyVarTy, mkClassPred,
+ typeKind, mkPrimEqPred)
+#endif
+import TcRnTypes (TcPlugin(..), TcPluginResult(..))
import TysWiredIn (typeNatKind)
import Coercion (CoercionHole, Role (..), mkForAllCos, mkHoleCo, mkInstCo,
mkNomReflCo, mkUnivCo)
import TcPluginM (newCoercionHole, newFlexiTyVar, tcLookupClass)
-import TcRnTypes
- (CtEvidence (..), CtLoc, TcEvDest (..), ctEvLoc, ctLoc, ctLocSpan, isGiven,
- setCtLoc, setCtLocSpan)
-#if MIN_VERSION_ghc(8,2,0)
+#if MIN_VERSION_ghc(8,9,0)
+import Constraint (ShadowInfo (WDeriv))
+#elif MIN_VERSION_ghc(8,2,0)
import TcRnTypes (ShadowInfo (WDeriv))
#endif
import TyCoRep (UnivCoProvenance (..))
-import Type (mkClassPred, mkPrimEqPred)
-import TcType (typeKind)
+import Type (mkClassPred, mkPrimEqPred, typeKind)
import TyCoRep (Type (..))
import TcTypeNats (typeNatAddTyCon, typeNatExpTyCon, typeNatMulTyCon,
typeNatSubTyCon)
diff --git a/src/GHC/TypeLits/Normalise/Unify.hs b/src/GHC/TypeLits/Normalise/Unify.hs
index 3183bfb..9d1471f 100644
--- a/src/GHC/TypeLits/Normalise/Unify.hs
+++ b/src/GHC/TypeLits/Normalise/Unify.hs
@@ -60,13 +60,21 @@ import GHC.Integer.Logarithms (integerLogBase#)
-- GHC API
import Outputable (Outputable (..), (<+>), ($$), text)
import TcPluginM (TcPluginM, tcPluginTrace)
+#if MIN_VERSION_ghc(8,9,0)
+import Constraint (Ct, ctEvidence, isGiven, ctEvPred)
+import Predicate (EqRel (NomEq), Pred (EqPred), mkPrimEqPred, classifyPredType)
+import Type (TyVar,
+ coreView, eqType, mkNumLitTy, mkTyConApp, mkTyVarTy,
+ nonDetCmpType, PredType)
+#else
import TcRnMonad (Ct, ctEvidence, isGiven)
-import TcRnTypes (ctEvPred)
-import TcTypeNats (typeNatAddTyCon, typeNatExpTyCon, typeNatMulTyCon,
- typeNatSubTyCon, typeNatLeqTyCon)
import Type (EqRel (NomEq), PredTree (EqPred), TyVar, classifyPredType,
coreView, eqType, mkNumLitTy, mkTyConApp, mkTyVarTy,
nonDetCmpType, PredType, mkPrimEqPred)
+import TcRnTypes (ctEvPred)
+#endif
+import TcTypeNats (typeNatAddTyCon, typeNatExpTyCon, typeNatMulTyCon,
+ typeNatSubTyCon, typeNatLeqTyCon)
import TyCoRep (Kind, Type (..), TyLit (..))
import TysWiredIn (boolTy, promotedTrueDataCon)
import UniqSet (UniqSet, unionManyUniqSets, emptyUniqSet, unionUniqSets,
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment