Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/47a9a997bde96e99a4b112c70bf953987a220fd1 >--------------------------------------------------------------- commit 47a9a997bde96e99a4b112c70bf953987a220fd1 Author: Simon Peyton Jones <[email protected]> Date: Mon Mar 5 09:27:28 2012 +0000 Deal with promoted DataCons in interface files (fixes Trac #5881) >--------------------------------------------------------------- compiler/iface/TcIface.lhs | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index a1cd558..0de0927 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 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
