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
#if __GLASGOW_HASKELL__ >= 707
import FamInstEnv
import ConLike (ConLike(..))
import PatSyn (patSynType)
#else
import TcRnTypes
#endif
@ -339,6 +341,11 @@ data GapThing = GtI Id | GtD DataCon | GtT TyCon | GtN
fromTyThing :: TyThing -> GapThing
fromTyThing (AnId i) = GtI i
#if __GLASGOW_HASKELL__ >= 707
fromTyThing (AConLike (RealDataCon d)) = GtD d
fromTyThing (AConLike (PatSynCon d)) = GtD d
#else
fromTyThing (ADataCon d) = GtD d
#endif
fromTyThing (ATyCon t) = GtT t
fromTyThing _ = GtN