X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcoreSyn%2FCoreUtils.lhs;h=d3afc57ce04d04a2a02a8d85738a47a67c51920f;hb=a77abe6a30ea2763cfa1c0ca83cdce9b7200ced2;hp=174f5053a8ee3188111b6884e64c4db210c91d34;hpb=c49d51f812da9b1c2ceca7e0dad8f2a3626041a9;p=ghc-hetmet.git diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 174f505..d3afc57 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -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.