diff options
Diffstat (limited to 'compiler/simplCore/CSE.hs')
-rw-r--r-- | compiler/simplCore/CSE.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs index 971b3e0ea6..21dbd0790a 100644 --- a/compiler/simplCore/CSE.hs +++ b/compiler/simplCore/CSE.hs @@ -6,7 +6,7 @@ {-# LANGUAGE CPP #-} -module CSE (cseProgram) where +module CSE (cseProgram, cseOneExpr) where #include "HsVersions.h" @@ -373,6 +373,9 @@ tryForCSE toplevel env expr -- top of the replaced sub-expression. This is probably not too -- useful in practice, but upholds our semantics. +cseOneExpr :: CoreExpr -> CoreExpr +cseOneExpr = cseExpr emptyCSEnv + cseExpr :: CSEnv -> InExpr -> OutExpr cseExpr env (Type t) = Type (substTy (csEnvSubst env) t) cseExpr env (Coercion c) = Coercion (substCo (csEnvSubst env) c) |