@@ -4,14 +4,13 @@ module TypeNatSolver (plugin) where
4
4
5
5
import Type ( Type , Kind , TyVar , eqType
6
6
, getTyVar_maybe , isNumLitTy , splitTyConApp_maybe
7
- , getEqPredTys , mkTyConApp , mkNumLitTy
8
- #if __GLASGOW_HASKELL__ <= 710
9
- , mkEqPred
10
- #else
11
- , mkPrimEqPred
12
- #endif
13
- , typeKind , classifyPredType , PredTree (.. ), EqRel (.. )
14
- , getTyVar_maybe , getEqPredTys_maybe
7
+ , mkTyConApp , mkNumLitTy
8
+ , typeKind
9
+ , getTyVar_maybe
10
+ )
11
+ import Predicate ( getEqPredTys , getEqPredTys_maybe
12
+ , mkPrimEqPred , classifyPredType
13
+ , Pred (.. ), EqRel (.. )
15
14
)
16
15
import TyCon ( TyCon )
17
16
import TcEvidence ( EvTerm (.. ) )
@@ -21,10 +20,10 @@ import OccName ( occNameString )
21
20
import Var ( tyVarName )
22
21
import TcPluginM ( TcPluginM , tcPluginIO , tcPluginTrace )
23
22
import TcRnMonad ( TcPlugin (.. ), TcPluginResult (.. )
24
- , Ct ( .. ), CtEvidence ( .. ), CtLoc , ctLoc , ctPred
25
- , mkNonCanonical , isTouchableTcM , unsafeTcPluginTcM
26
- )
27
- import TcRnTypes ( isDerivedCt )
23
+ , isTouchableTcM , unsafeTcPluginTcM )
24
+ import Constraint ( Ct ( .. ), CtEvidence ( .. ), CtLoc , ctLoc , ctPred
25
+ , mkNonCanonical , isDerivedCt
26
+ )
28
27
import Plugins ( CommandLineOption , defaultPlugin , Plugin (.. ) )
29
28
30
29
import TcTypeNats ( typeNatAddTyCon
@@ -33,14 +32,10 @@ import TcTypeNats ( typeNatAddTyCon
33
32
, typeNatLeqTyCon
34
33
)
35
34
import TysWiredIn ( typeNatKindCon
36
- #if __GLASGOW_HASKELL__ <= 710
37
- , promotedBoolTyCon
38
- #else
39
35
, boolTyCon
40
- #endif
41
36
, promotedFalseDataCon , promotedTrueDataCon
42
37
)
43
- import TrieMap ( TypeMap , emptyTypeMap , lookupTypeMap , extendTypeMap )
38
+ import CoreMap ( TypeMap , emptyTypeMap , lookupTypeMap , extendTypeMap )
44
39
45
40
import Outputable
46
41
@@ -59,14 +54,6 @@ import qualified SimpleSMT as SMT
59
54
60
55
import GHC.TcPluginM.Extra (newGiven , newDerived , evByFiat )
61
56
62
- -- Forward compatibility with GHC 8.0 (some names changed):
63
- #if __GLASGOW_HASKELL__ > 710
64
- promotedBoolTyCon :: TyCon
65
- promotedBoolTyCon = boolTyCon
66
- mkEqPred :: Type -> Type -> Type
67
- mkEqPred = mkPrimEqPred
68
- #endif
69
-
70
57
plugin :: Plugin
71
58
plugin = defaultPlugin { tcPlugin = Just . thePlugin }
72
59
@@ -586,7 +573,6 @@ type NewVarDecls = Map String (Type,Ty)
586
573
587
574
instance Monad ImportM where
588
575
return a = Imp (\ s -> (a, s, Map. empty))
589
- fail err = panic err
590
576
Imp m >>= k = Imp (\ s -> let (a,s1,ds1) = m s
591
577
Imp m1 = k a
592
578
(b,s2,ds2) = m1 s1
0 commit comments