[project @ 1996-05-16 09:42:08 by partain]
[ghc-hetmet.git] / ghc / compiler / stgSyn / CoreToStg.lhs
index c3bd393..3ed0d38 100644 (file)
@@ -37,11 +37,11 @@ import PrelInfo             ( unpackCStringId, unpackCString2Id, stringTy,
 import PrimOp          ( PrimOp(..) )
 import SpecUtils       ( mkSpecialisedCon )
 import SrcLoc          ( mkUnknownSrcLoc )
-import Type            ( getAppDataTyCon )
+import Type            ( getAppDataTyConExpandingDicts )
 import UniqSupply      -- all of it, really
 import Util            ( panic )
 
-isLeakFreeType = panic "CoreToStg.isLeakFreeType (ToDo)"
+isLeakFreeType x y = False -- safe option; ToDo
 \end{code}
 
 
@@ -543,7 +543,7 @@ coreExprToStg env (Case discrim alts)
     )
   where
     discrim_ty             = coreExprType discrim
-    (_, discrim_ty_args, _) = getAppDataTyCon discrim_ty
+    (_, discrim_ty_args, _) = getAppDataTyConExpandingDicts discrim_ty
 
     alts_to_stg discrim (AlgAlts alts deflt)
       = default_to_stg discrim deflt           `thenUs` \ (stg_deflt, deflt_binds) ->
@@ -617,6 +617,12 @@ coreExprToStg env (SCC cc expr)
     returnUs (StgSCC (coreExprType expr) cc stg_expr, binds)
 \end{code}
 
+\begin{code}
+coreExprToStg env (Coerce c ty expr)
+  = coreExprToStg env expr  -- `thenUs` \ (stg_expr, binds) ->
+--  returnUs (StgSCC (coreExprType expr) cc stg_expr, binds)
+\end{code}
+
 
 %************************************************************************
 %*                                                                     *