Skip to content
Snippets Groups Projects
Commit 5815105c authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Layout only

parent c916244f
No related branches found
No related tags found
No related merge requests found
...@@ -87,14 +87,13 @@ import GHC.Exts -- For `xori` ...@@ -87,14 +87,13 @@ import GHC.Exts -- For `xori`
\begin{code} \begin{code}
exprType :: CoreExpr -> Type exprType :: CoreExpr -> Type
exprType (Var var) = idType var exprType (Var var) = idType var
exprType (Lit lit) = literalType lit exprType (Lit lit) = literalType lit
exprType (Let _ body) = exprType body exprType (Let _ body) = exprType body
exprType (Case _ _ ty alts) = ty exprType (Case _ _ ty alts) = ty
exprType (Cast e co) exprType (Cast e co) = snd (coercionKind co)
= let (_, ty) = coercionKind co in ty exprType (Note other_note e) = exprType e
exprType (Note other_note e) = exprType e exprType (Lam binder expr) = mkPiType binder (exprType expr)
exprType (Lam binder expr) = mkPiType binder (exprType expr)
exprType e@(App _ _) exprType e@(App _ _)
= case collectArgs e of = case collectArgs e of
(fun, args) -> applyTypeToArgs e (exprType fun) args (fun, args) -> applyTypeToArgs e (exprType fun) args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment