From 3251e3babb0ed2e241e3c1e7f9dcf9deb4a548a1 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 20 Feb 2003 13:16:31 +0000 Subject: [PATCH] [project @ 2003-02-20 13:16:31 by simonpj] Another datacon-naming wibble --- ghc/compiler/main/MkIface.lhs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/main/MkIface.lhs b/ghc/compiler/main/MkIface.lhs index 2b35f37..b01dacd 100644 --- a/ghc/compiler/main/MkIface.lhs +++ b/ghc/compiler/main/MkIface.lhs @@ -39,7 +39,7 @@ import HscTypes ( VersionInfo(..), ModIface(..), import CmdLineOpts import Id ( idType, idInfo, isImplicitId, idCgInfo ) -import DataCon ( dataConName, dataConSig, dataConFieldLabels, dataConStrictMarks ) +import DataCon ( dataConName, dataConSig, dataConFieldLabels, dataConStrictMarks, dataConWrapId ) import IdInfo -- Lots import CoreSyn ( CoreRule(..), IdCoreRule ) import CoreFVs ( ruleLhsFreeNames ) @@ -224,6 +224,7 @@ we miss them out of the accumulating parameter here. \begin{code} ifaceTyThing_acc :: TyThing -> [RenamedTyClDecl] -> [RenamedTyClDecl] +-- Don't put implicit things into the result ifaceTyThing_acc (ADataCon dc) so_far = so_far ifaceTyThing_acc (AnId id) so_far | isImplicitId id = so_far ifaceTyThing_acc (ATyCon id) so_far | isClassTyCon id = so_far @@ -380,6 +381,11 @@ ifaceTyThing (AnId id) = iface_sig unfold_hsinfo | neverUnfold unfold_info || has_worker = Nothing | otherwise = Just (HsUnfold inline_prag (toUfExpr rhs)) + + +ifaceTyThing (ADataCon dc) = ifaceTyThing (AnId (dataConWrapId dc)) + -- This case only happens in the call to ifaceThing in InteractiveUI + -- Otherwise DataCons are filtered out in ifaceThing_acc \end{code} \begin{code} -- 1.7.10.4