Fixed Gap.fromTyThing

fromTyThing was rendering the internal representation rather than
user representation for ADataCon and AConLike TyThing type
constructors.
This commit is contained in:
Agustín Mista 2016-12-13 11:30:24 -03:00
parent 8be4885d86
commit f559616967
1 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ import Data.List (intersperse)
import Data.Maybe (catMaybes) import Data.Maybe (catMaybes)
import Data.Time.Clock (UTCTime) import Data.Time.Clock (UTCTime)
import Data.Traversable hiding (mapM) import Data.Traversable hiding (mapM)
import DataCon (dataConRepType) import DataCon (dataConUserType)
import Desugar (deSugarExpr) import Desugar (deSugarExpr)
import DynFlags import DynFlags
import ErrUtils import ErrUtils
@ -515,14 +515,14 @@ data GapThing = GtA Type
fromTyThing :: TyThing -> GapThing fromTyThing :: TyThing -> GapThing
fromTyThing (AnId i) = GtA $ varType i fromTyThing (AnId i) = GtA $ varType i
#if __GLASGOW_HASKELL__ >= 708 #if __GLASGOW_HASKELL__ >= 708
fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConRepType d fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConUserType d
#if __GLASGOW_HASKELL__ >= 800 #if __GLASGOW_HASKELL__ >= 800
fromTyThing (AConLike (PatSynCon p)) = GtPatSyn p fromTyThing (AConLike (PatSynCon p)) = GtPatSyn p
#else #else
fromTyThing (AConLike (PatSynCon p)) = GtA $ patSynType p fromTyThing (AConLike (PatSynCon p)) = GtA $ patSynType p
#endif #endif
#else #else
fromTyThing (ADataCon d) = GtA $ dataConRepType d fromTyThing (ADataCon d) = GtA $ dataConUserType d
#endif #endif
fromTyThing (ATyCon t) = GtT t fromTyThing (ATyCon t) = GtT t
fromTyThing _ = GtN fromTyThing _ = GtN