Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix imports to work with GHC 8.10 #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
30 changes: 12 additions & 18 deletions src/TypeNatSolver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ module TypeNatSolver (plugin) where

import Type ( Type, Kind, TyVar, eqType
, getTyVar_maybe, isNumLitTy, splitTyConApp_maybe
, getEqPredTys, mkTyConApp, mkNumLitTy
#if __GLASGOW_HASKELL__ <= 710
, mkEqPred
#else
, mkPrimEqPred
#endif
, typeKind, classifyPredType, PredTree(..), EqRel(..)
, getTyVar_maybe, getEqPredTys_maybe
, mkTyConApp, mkNumLitTy
, typeKind
, getTyVar_maybe
)
import Predicate ( getEqPredTys, getEqPredTys_maybe
, mkPrimEqPred, classifyPredType
, Pred(..), EqRel(..)
)
import TyCon ( TyCon )
import TcEvidence ( EvTerm(..) )
Expand All @@ -21,10 +20,10 @@ import OccName ( occNameString )
import Var ( tyVarName )
import TcPluginM ( TcPluginM, tcPluginIO, tcPluginTrace )
import TcRnMonad ( TcPlugin(..), TcPluginResult(..)
, Ct(..), CtEvidence(..), CtLoc, ctLoc, ctPred
, mkNonCanonical, isTouchableTcM, unsafeTcPluginTcM
)
import TcRnTypes ( isDerivedCt )
, isTouchableTcM, unsafeTcPluginTcM )
import Constraint ( Ct(..), CtEvidence(..), CtLoc, ctLoc, ctPred
, mkNonCanonical, isDerivedCt
)
import Plugins ( CommandLineOption, defaultPlugin, Plugin(..) )

import TcTypeNats ( typeNatAddTyCon
Expand All @@ -33,14 +32,10 @@ import TcTypeNats ( typeNatAddTyCon
, typeNatLeqTyCon
)
import TysWiredIn ( typeNatKindCon
#if __GLASGOW_HASKELL__ <= 710
, promotedBoolTyCon
#else
, boolTyCon
#endif
, promotedFalseDataCon, promotedTrueDataCon
)
import TrieMap ( TypeMap, emptyTypeMap, lookupTypeMap, extendTypeMap )
import CoreMap ( TypeMap, emptyTypeMap, lookupTypeMap, extendTypeMap )

import Outputable

Expand Down Expand Up @@ -586,7 +581,6 @@ type NewVarDecls = Map String (Type,Ty)

instance Monad ImportM where
return a = Imp (\s -> (a, s, Map.empty))
fail err = panic err
Imp m >>= k = Imp (\s -> let (a,s1,ds1) = m s
Imp m1 = k a
(b,s2,ds2) = m1 s1
Expand Down