Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
65c3992d
Commit
65c3992d
authored
Sep 13, 2006
by
Simon Marlow
Browse files
minor reformatting
parent
eff36ab9
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/iface/LoadIface.lhs
View file @
65c3992d
...
@@ -334,7 +334,9 @@ ifaceDeclSubBndrs :: IfaceDecl -> [OccName]
...
@@ -334,7 +334,9 @@ ifaceDeclSubBndrs :: IfaceDecl -> [OccName]
-- Deeply revolting, because it has to predict what gets bound,
-- Deeply revolting, because it has to predict what gets bound,
-- especially the question of whether there's a wrapper for a datacon
-- especially the question of whether there's a wrapper for a datacon
ifaceDeclSubBndrs (IfaceClass {ifCtxt = sc_ctxt, ifName = cls_occ, ifSigs = sigs })
ifaceDeclSubBndrs IfaceClass { ifCtxt = sc_ctxt,
ifName = cls_occ,
ifSigs = sigs }
= [tc_occ, dc_occ, dcww_occ] ++
= [tc_occ, dc_occ, dcww_occ] ++
[op | IfaceClassOp op _ _ <- sigs] ++
[op | IfaceClassOp op _ _ <- sigs] ++
[mkSuperDictSelOcc n cls_occ | n <- [1..n_ctxt]]
[mkSuperDictSelOcc n cls_occ | n <- [1..n_ctxt]]
...
@@ -347,11 +349,12 @@ ifaceDeclSubBndrs (IfaceClass {ifCtxt = sc_ctxt, ifName = cls_occ, ifSigs = sigs
...
@@ -347,11 +349,12 @@ ifaceDeclSubBndrs (IfaceClass {ifCtxt = sc_ctxt, ifName = cls_occ, ifSigs = sigs
| otherwise = mkDataConWorkerOcc dc_occ -- Otherwise worker but no wrapper
| otherwise = mkDataConWorkerOcc dc_occ -- Otherwise worker but no wrapper
is_newtype = n_sigs + n_ctxt == 1 -- Sigh
is_newtype = n_sigs + n_ctxt == 1 -- Sigh
ifaceDeclSubBndrs
(
IfaceData {ifCons = IfAbstractTyCon}
)
ifaceDeclSubBndrs IfaceData {ifCons = IfAbstractTyCon}
= []
= []
-- Newtype
-- Newtype
ifaceDeclSubBndrs (IfaceData {ifCons = IfNewTyCon (IfVanillaCon { ifConOcc = con_occ,
ifaceDeclSubBndrs IfaceData {ifCons = IfNewTyCon (IfVanillaCon {
ifConFields = fields})})
ifConOcc = con_occ,
ifConFields = fields})}
= fields ++ [con_occ, mkDataConWrapperOcc con_occ]
= fields ++ [con_occ, mkDataConWrapperOcc con_occ]
-- Wrapper, no worker; see MkId.mkDataConIds
-- Wrapper, no worker; see MkId.mkDataConIds
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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