From: simonpj Date: Mon, 12 Jan 2004 12:13:26 +0000 (+0000) Subject: [project @ 2004-01-12 12:13:26 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~131 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0a095555ecc6400aba433bb7562140ac407730e1;hp=9a9feb62db17daf7f2566395f719c2aecec5feb0 [project @ 2004-01-12 12:13:26 by simonpj] Use PolyAlt when we dont know constructors --- diff --git a/ghc/compiler/stgSyn/CoreToStg.lhs b/ghc/compiler/stgSyn/CoreToStg.lhs index 02258a9..2f59489 100644 --- a/ghc/compiler/stgSyn/CoreToStg.lhs +++ b/ghc/compiler/stgSyn/CoreToStg.lhs @@ -19,7 +19,7 @@ import Type import TyCon ( isAlgTyCon ) import Id import Var ( Var, globalIdDetails, idType ) -import TyCon ( isUnboxedTupleTyCon, isPrimTyCon, isFunTyCon ) +import TyCon ( isUnboxedTupleTyCon, isPrimTyCon, isFunTyCon, isHiBootTyCon ) #ifdef ILX import MkId ( unsafeCoerceId ) #endif @@ -411,7 +411,8 @@ mkStgAltType scrut_ty = case splitTyConApp_maybe (repType scrut_ty) of Just (tc,_) | isUnboxedTupleTyCon tc -> UbxTupAlt tc | isPrimTyCon tc -> PrimAlt tc - | isAlgTyCon tc -> AlgAlt tc + | isHiBootTyCon tc -> PolyAlt -- Algebraic, but no constructors visible + | isAlgTyCon tc -> AlgAlt tc | isFunTyCon tc -> PolyAlt | otherwise -> pprPanic "mkStgAlts" (ppr tc) Nothing -> PolyAlt