projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eff36ab
)
minor reformatting
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 13 Sep 2006 10:34:27 +0000
(10:34 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 13 Sep 2006 10:34:27 +0000
(10:34 +0000)
compiler/iface/LoadIface.lhs
patch
|
blob
|
history
diff --git
a/compiler/iface/LoadIface.lhs
b/compiler/iface/LoadIface.lhs
index
ecba1d6
..
70f335f
100644
(file)
--- a/
compiler/iface/LoadIface.lhs
+++ b/
compiler/iface/LoadIface.lhs
@@
-334,7
+334,9
@@
ifaceDeclSubBndrs :: IfaceDecl -> [OccName]
-- Deeply revolting, because it has to predict what gets bound,
-- especially the question of whether there's a wrapper for a datacon
-- Deeply revolting, because it has to predict what gets bound,
-- 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] ++
[op | IfaceClassOp op _ _ <- sigs] ++
[mkSuperDictSelOcc n cls_occ | n <- [1..n_ctxt]]
= [tc_occ, dc_occ, dcww_occ] ++
[op | IfaceClassOp op _ _ <- sigs] ++
[mkSuperDictSelOcc n cls_occ | n <- [1..n_ctxt]]
@@
-347,12
+349,13
@@
ifaceDeclSubBndrs (IfaceClass {ifCtxt = sc_ctxt, ifName = cls_occ, ifSigs = sigs
| otherwise = mkDataConWorkerOcc dc_occ -- Otherwise worker but no wrapper
is_newtype = n_sigs + n_ctxt == 1 -- Sigh
| otherwise = mkDataConWorkerOcc dc_occ -- Otherwise worker but no wrapper
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,
- ifConFields = fields})})
- = fields ++ [con_occ, mkDataConWrapperOcc con_occ]
+ifaceDeclSubBndrs IfaceData {ifCons = IfNewTyCon (IfVanillaCon {
+ ifConOcc = con_occ,
+ ifConFields = fields})}
+ = fields ++ [con_occ, mkDataConWrapperOcc con_occ]
-- Wrapper, no worker; see MkId.mkDataConIds
ifaceDeclSubBndrs (IfaceData {ifCons = IfDataTyCon cons})
-- Wrapper, no worker; see MkId.mkDataConIds
ifaceDeclSubBndrs (IfaceData {ifCons = IfDataTyCon cons})
@@
-360,7
+363,7
@@
ifaceDeclSubBndrs (IfaceData {ifCons = IfDataTyCon cons})
++ concatMap dc_occs cons
where
fld_occs (IfVanillaCon { ifConFields = fields }) = fields
++ concatMap dc_occs cons
where
fld_occs (IfVanillaCon { ifConFields = fields }) = fields
- fld_occs (IfGadtCon {}) = []
+ fld_occs (IfGadtCon {}) = []
dc_occs con_decl
| has_wrapper = [con_occ, work_occ, wrap_occ]
| otherwise = [con_occ, work_occ]
dc_occs con_decl
| has_wrapper = [con_occ, work_occ, wrap_occ]
| otherwise = [con_occ, work_occ]