Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
0b1ca3f5
Commit
0b1ca3f5
authored
Oct 10, 2003
by
simonpj
Browse files
[project @ 2003-10-10 07:34:34 by simonpj]
Wibbles
parent
bb018f16
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/iface/LoadIface.lhs
View file @
0b1ca3f5
...
...
@@ -281,8 +281,9 @@ loadDecl ignore_prags mod decls_map (_version, decl)
mk_new_bndr mb_parent occ = newGlobalBinder mod occ mb_parent loc
loc = importedSrcLoc (moduleUserString mod)
zapIdInfo decl@(IfaceId { ifIdInfo = HasInfo _ }) = decl { ifIdInfo = DiscardedInfo }
zapIdInfo decl = decl
zapIdInfo decl@(IfaceId {ifIdInfo = HasInfo _}) = decl { ifIdInfo = DiscardedInfo }
zapIdInfo decl = decl
-- Don't alter "NoInfo", just "HasInfo"
-----------------
ifaceDeclSubBndrs :: IfaceDecl -> [OccName]
...
...
@@ -307,8 +308,8 @@ ifaceDeclSubBndrs (IfaceData {ifCons = DataCons cons})
ifaceDeclSubBndrs other = []
conDeclBndrs (IfaceConDecl con_occ _ _ _ _ fields)
=
[con_occ, mkDataConWrapperOcc con_occ, mkDataConWorkerOcc con_occ]
++ fields
=
fields ++
[con_occ, mkDataConWrapperOcc con_occ, mkDataConWorkerOcc con_occ]
-----------------------------------------------------
...
...
ghc/compiler/iface/TcIface.lhs
View file @
0b1ca3f5
...
...
@@ -112,12 +112,12 @@ tcImportDecl name
= do {
-- Make sure the interface is loaded
; let { nd_doc = ptext SLIT("Need decl for") <+> ppr name }
; traceIf nd_doc
; traceIf
(
nd_doc
<+> char '{') -- Brace matches the later message
; loadHomeInterface nd_doc name
-- Get the real name of the thing, with a correct nameParent field.
-- Before the interface is loaded, we may have a non-commital 'Nothing'
in
-- the namePareent field (made up by IfaceEnv.lookupOrig), but
-- Before the interface is loaded, we may have a non-commit
t
al 'Nothing'
--
in
the namePareent field (made up by IfaceEnv.lookupOrig), but
-- loading the interface updates the name cache.
-- We need the right nameParent field in getThing
; real_name <- lookupOrig (nameModuleName name) (nameOccName name)
...
...
@@ -132,7 +132,7 @@ tcImportDecl name
; let { extra | getName main_thing == real_name = empty
| otherwise = brackets (ptext SLIT("when seeking") <+> ppr real_name) }
; traceIf (ptext SLIT("...imported decl for") <+> ppr main_thing <+> extra)
; traceIf (ptext SLIT("
...imported decl for") <+> ppr main_thing <+> extra
<+> char '}'
)
-- Look up the wanted Name in the type envt; it might be
...
...
@@ -173,6 +173,7 @@ recordImportOf thing
-- Now type-check those rules (which may side-effect the EPS again)
; traceIf (text "tcImport: extend type env" <+> ppr new_things)
; traceIf (text "tcImport: rules" <+> vcat (map ppr iface_rules))
; core_rules <- mapM tc_rule iface_rules
; updateEps_ (\ eps ->
eps { eps_rule_base = extendRuleBaseList (eps_rule_base eps) core_rules }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment