X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscTypes.lhs;h=6b1d05397ddc42119448cb177de0b67414edaa93;hb=a4cb9b55d85b08480fd1d149db1aa4a9d46dcb40;hp=0a6ad3d2017865235ffe4964064b0729040b6894;hpb=7379e82aafc7d0c1b839a13a20d52babeafed023;p=ghc-hetmet.git diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index 0a6ad3d..6b1d053 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -96,7 +96,7 @@ import Type import Class ( Class, classSelIds, classATs, classTyCon ) import TyCon -import DataCon ( DataCon, dataConImplicitIds ) +import DataCon ( DataCon, dataConImplicitIds, dataConWrapId ) import PrelNames ( gHC_PRIM ) import Packages hiding ( Version(..) ) import DynFlags ( DynFlags(..), isOneShot, HscTarget (..) ) @@ -115,6 +115,7 @@ import UniqSupply ( UniqSupply ) import FastString ( FastString ) import StringBuffer ( StringBuffer ) +import System.FilePath import System.Time ( ClockTime ) import Data.IORef import Data.Array ( Array, array ) @@ -284,7 +285,7 @@ lookupIfaceByModule dflags hpt pit mod -- (a) In OneShot mode, even home-package modules accumulate in the PIT -- (b) Even in Batch (--make) mode, there is *one* case where a home-package -- module is in the PIT, namely GHC.Prim when compiling the base package. --- We could eliminate (b) if we wanted, by making GHC.Prim belong to a packake +-- We could eliminate (b) if we wanted, by making GHC.Prim belong to a package -- of its own, but it doesn't seem worth the bother. \end{code} @@ -560,7 +561,9 @@ data CoreModule -- Type environment for types declared in this module cm_types :: !TypeEnv, -- Declarations - cm_binds :: [CoreBind] + cm_binds :: [CoreBind], + -- Imports + cm_imports :: ![Module] } instance Outputable CoreModule where @@ -959,8 +962,9 @@ tyThingDataCon (ADataCon dc) = dc tyThingDataCon other = pprPanic "tyThingDataCon" (pprTyThing other) tyThingId :: TyThing -> Id -tyThingId (AnId id) = id -tyThingId other = pprPanic "tyThingId" (pprTyThing other) +tyThingId (AnId id) = id +tyThingId (ADataCon dc) = dataConWrapId dc +tyThingId other = pprPanic "tyThingId" (pprTyThing other) \end{code} %************************************************************************ @@ -1339,14 +1343,15 @@ instance Outputable ModSummary where showModMsg :: HscTarget -> Bool -> ModSummary -> String showModMsg target recomp mod_summary - = showSDoc (hsep [text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' '), - char '(', text (msHsFilePath mod_summary) <> comma, - case target of - HscInterpreted | recomp - -> text "interpreted" - HscNothing -> text "nothing" - _other -> text (msObjFilePath mod_summary), - char ')']) + = showSDoc $ + hsep [text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' '), + char '(', text (normalise $ msHsFilePath mod_summary) <> comma, + case target of + HscInterpreted | recomp + -> text "interpreted" + HscNothing -> text "nothing" + _ -> text (normalise $ msObjFilePath mod_summary), + char ')'] where mod = moduleName (ms_mod mod_summary) mod_str = showSDoc (ppr mod) ++ hscSourceString (ms_hsc_src mod_summary) @@ -1481,7 +1486,9 @@ data Unlinked | BCOs CompiledByteCode ModBreaks #ifndef GHCI -data CompiledByteCode +data CompiledByteCode = CompiledByteCodeUndefined +_unused :: CompiledByteCode +_unused = CompiledByteCodeUndefined #endif instance Outputable Unlinked where