supporting GHC 7.8rc1. (#186)

from @bartavelle.
This commit is contained in:
Kazu Yamamoto 2014-02-06 21:40:51 +09:00
parent 45154e6eb1
commit 891ddf639b

View File

@ -55,6 +55,8 @@ import qualified Pretty
import qualified StringBuffer as SB import qualified StringBuffer as SB
#if __GLASGOW_HASKELL__ >= 707 #if __GLASGOW_HASKELL__ >= 707
import FamInstEnv import FamInstEnv
import ConLike (ConLike(..))
import PatSyn (patSynType)
#else #else
import TcRnTypes import TcRnTypes
#endif #endif
@ -338,7 +340,12 @@ deSugar tcm e hs_env = snd <$> deSugarExpr hs_env modu rn_env ty_env e
data GapThing = GtI Id | GtD DataCon | GtT TyCon | GtN data GapThing = GtI Id | GtD DataCon | GtT TyCon | GtN
fromTyThing :: TyThing -> GapThing fromTyThing :: TyThing -> GapThing
fromTyThing (AnId i) = GtI i fromTyThing (AnId i) = GtI i
fromTyThing (ADataCon d) = GtD d #if __GLASGOW_HASKELL__ >= 707
fromTyThing (ATyCon t) = GtT t fromTyThing (AConLike (RealDataCon d)) = GtD d
fromTyThing _ = GtN fromTyThing (AConLike (PatSynCon d)) = GtD d
#else
fromTyThing (ADataCon d) = GtD d
#endif
fromTyThing (ATyCon t) = GtT t
fromTyThing _ = GtN