summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-10-19 12:53:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-10-19 12:53:21 +0100
commit8019bc2cb7b2883bdf0da49ccdc52ecc9e2ad2fc (patch)
tree0c884e867c538c8f9513ad236bbf2b5a2e1a1fb0 /compiler/iface
parent27260333c8ef58137e8b3b17fe332725f62c932f (diff)
downloadhaskell-8019bc2cb7b2883bdf0da49ccdc52ecc9e2ad2fc.tar.gz
Only promote *non-existential* data constructors
I don't konw how this was left out before; Trac #7347. In fixing this I did the usual round of refactoring. In particular, I cached the fact that a DataCon can be promoted in the DataCon itself (the dcPromoted field).
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/TcIface.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs
index 19b5cfe405..3db325afb9 100644
--- a/compiler/iface/TcIface.lhs
+++ b/compiler/iface/TcIface.lhs
@@ -1364,7 +1364,7 @@ tcIfaceTyCon (IfaceTc name)
; case thing of -- A "type constructor" can be a promoted data constructor
-- c.f. Trac #5881
ATyCon tc -> return tc
- ADataCon dc -> return (buildPromotedDataCon dc)
+ ADataCon dc -> return (promoteDataCon dc)
_ -> pprPanic "tcIfaceTyCon" (ppr name $$ ppr thing) }
tcIfaceKindCon :: IfaceTyCon -> IfL TyCon
@@ -1374,7 +1374,7 @@ tcIfaceKindCon (IfaceTc name)
-- c.f. Trac #5881
ATyCon tc
| isSuperKind (tyConKind tc) -> return tc -- Mainly just '*' or 'AnyK'
- | otherwise -> return (buildPromotedTyCon tc)
+ | otherwise -> return (promoteTyCon tc)
_ -> pprPanic "tcIfaceKindCon" (ppr name $$ ppr thing) }