summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2012-03-07 17:28:21 +0000
committerMax Bolingbroke <batterseapower@hotmail.com>2012-03-07 17:28:21 +0000
commit4f070dd16ee31f38aff931f4b7b0ce562dcb98f4 (patch)
treedd41663f9b3fc6934e573c6f8ee2106db8259192 /compiler/iface
parentfeeedb3ccf4977eb028924d072244237ff6e3984 (diff)
parent28f783f1c367784e0adcac2447682061a38f2ba3 (diff)
downloadhaskell-unboxed-tuple-arguments.tar.gz
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc into unboxed-tuple-argumentsunboxed-tuple-arguments
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/TcIface.lhs9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs
index a1cd558bc0..0de092742c 100644
--- a/compiler/iface/TcIface.lhs
+++ b/compiler/iface/TcIface.lhs
@@ -1283,8 +1283,13 @@ tcIfaceGlobal name
-- emasculated form (e.g. lacking data constructors).
tcIfaceTyCon :: IfaceTyCon -> IfL TyCon
-tcIfaceTyCon (IfaceTc name) = do { thing <- tcIfaceGlobal name
- ; return (tyThingTyCon thing) }
+tcIfaceTyCon (IfaceTc name)
+ = do { thing <- tcIfaceGlobal 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)
+ _ -> pprPanic "tcIfaceTyCon" (ppr name $$ ppr thing) }
tcIfaceCoAxiom :: Name -> IfL CoAxiom
tcIfaceCoAxiom name = do { thing <- tcIfaceGlobal name