summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2007-05-02 16:38:15 +0000
committersimonpj@microsoft.com <unknown>2007-05-02 16:38:15 +0000
commit5815105cd4613a200c3730b76aa342c979f9fcec (patch)
treec63011ff97b2d835a740a7187b7bef88220801a1
parentc916244fe9246b4f9d88a9b1c7c9ee8c55b15696 (diff)
downloadhaskell-5815105cd4613a200c3730b76aa342c979f9fcec.tar.gz
Layout only
-rw-r--r--compiler/coreSyn/CoreUtils.lhs15
1 files changed, 7 insertions, 8 deletions
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs
index d4d58df60d..a425bc3b9a 100644
--- a/compiler/coreSyn/CoreUtils.lhs
+++ b/compiler/coreSyn/CoreUtils.lhs
@@ -87,14 +87,13 @@ import GHC.Exts -- For `xori`
\begin{code}
exprType :: CoreExpr -> Type
-exprType (Var var) = idType var
-exprType (Lit lit) = literalType lit
-exprType (Let _ body) = exprType body
-exprType (Case _ _ ty alts) = ty
-exprType (Cast e co)
- = let (_, ty) = coercionKind co in ty
-exprType (Note other_note e) = exprType e
-exprType (Lam binder expr) = mkPiType binder (exprType expr)
+exprType (Var var) = idType var
+exprType (Lit lit) = literalType lit
+exprType (Let _ body) = exprType body
+exprType (Case _ _ ty alts) = ty
+exprType (Cast e co) = snd (coercionKind co)
+exprType (Note other_note e) = exprType e
+exprType (Lam binder expr) = mkPiType binder (exprType expr)
exprType e@(App _ _)
= case collectArgs e of
(fun, args) -> applyTypeToArgs e (exprType fun) args