From f5596169673d923c987307b5c1309a37e41837dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Mista?= Date: Tue, 13 Dec 2016 11:30:24 -0300 Subject: [PATCH] Fixed Gap.fromTyThing fromTyThing was rendering the internal representation rather than user representation for ADataCon and AConLike TyThing type constructors. --- Language/Haskell/GhcMod/Gap.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Language/Haskell/GhcMod/Gap.hs b/Language/Haskell/GhcMod/Gap.hs index 8d342fd..6f6645f 100644 --- a/Language/Haskell/GhcMod/Gap.hs +++ b/Language/Haskell/GhcMod/Gap.hs @@ -57,7 +57,7 @@ import Data.List (intersperse) import Data.Maybe (catMaybes) import Data.Time.Clock (UTCTime) import Data.Traversable hiding (mapM) -import DataCon (dataConRepType) +import DataCon (dataConUserType) import Desugar (deSugarExpr) import DynFlags import ErrUtils @@ -515,14 +515,14 @@ data GapThing = GtA Type fromTyThing :: TyThing -> GapThing fromTyThing (AnId i) = GtA $ varType i #if __GLASGOW_HASKELL__ >= 708 -fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConRepType d +fromTyThing (AConLike (RealDataCon d)) = GtA $ dataConUserType d #if __GLASGOW_HASKELL__ >= 800 fromTyThing (AConLike (PatSynCon p)) = GtPatSyn p #else fromTyThing (AConLike (PatSynCon p)) = GtA $ patSynType p #endif #else -fromTyThing (ADataCon d) = GtA $ dataConRepType d +fromTyThing (ADataCon d) = GtA $ dataConUserType d #endif fromTyThing (ATyCon t) = GtT t fromTyThing _ = GtN