[project @ 1996-04-25 16:31:20 by partain]
[ghc-hetmet.git] / ghc / compiler / coreSyn / CoreUtils.lhs
index 174f505..d3afc57 100644 (file)
@@ -12,7 +12,6 @@ module CoreUtils (
        substCoreExpr, substCoreBindings
 
        , mkCoreIfThenElse
-       , escErrorMsg -- ToDo: kill
        , argToExpr
        , unTagBinders, unTagBindersAlts
        , manifestlyWHNF, manifestlyBottom
@@ -130,7 +129,8 @@ default_ty (BindDefault _ rhs) = coreExprType rhs
 \end{code}
 
 \begin{code}
-applyTypeToArgs = panic "applyTypeToArgs"
+applyTypeToArgs op_ty args
+  = foldl applyTy op_ty [ ty | TyArg ty <- args ]
 \end{code}
 
 %************************************************************************
@@ -151,23 +151,6 @@ mkCoreIfThenElse guard then_expr else_expr
        NoDefault )
 \end{code}
 
-\begin{code}
-{- OLD:
-mkErrorApp :: Id -> Type -> Id -> String -> CoreExpr
-
-mkErrorApp err_fun ty str_var error_msg
-  = Let (NonRec str_var (Lit (NoRepStr (_PK_ error_msg)))) (
-    mkApp (Var err_fun) [] [ty] [VarArg str_var])
--}
-
-escErrorMsg = panic "CoreUtils.escErrorMsg: To Die"
-{- OLD:
-escErrorMsg [] = []
-escErrorMsg ('%':xs) = '%' : '%' : escErrorMsg xs
-escErrorMsg (x:xs)   = x : escErrorMsg xs
--}
-\end{code}
-
 For making @Apps@ and @Lets@, we must take appropriate evasive
 action if the thing being bound has unboxed type.  @mkCoApp@ requires
 a name supply to do its work.