summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarter Tazio Schonwald <carter.schonwald@gmail.com>2019-12-31 16:55:55 -0500
committerCarter Tazio Schonwald <carter.schonwald@gmail.com>2019-12-31 16:55:55 -0500
commit2b7a9efa308ade474c1ea17f049f8081b5c38319 (patch)
treeb3f75f059e7f8c9abab26f44271d3df53afd1486
parentd98ded49d160ad3769a6c773635a4bc2b135de91 (diff)
downloadhaskell-2b7a9efa308ade474c1ea17f049f8081b5c38319.tar.gz
fixed more type errors that were boring
-rw-r--r--compiler/simplCore/CoreEraseCoercionProofs.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/simplCore/CoreEraseCoercionProofs.hs b/compiler/simplCore/CoreEraseCoercionProofs.hs
index 2c4a3a11c1..508666e160 100644
--- a/compiler/simplCore/CoreEraseCoercionProofs.hs
+++ b/compiler/simplCore/CoreEraseCoercionProofs.hs
@@ -16,21 +16,21 @@ Top-level interface function, @eraseCoercionProgram@.
eraseCoercionProgram :: ModGuts -> CoreM ModGuts
eraseCoercionProgram pgm@(ModGuts { mg_binds = binds })
= do { dflags <- getDynFlags ;
- return (pgm { mg_binds = map (coreProgramEraseCoercionProofs dflags) binds })
+ return (pgm { mg_binds = coreProgramEraseCoercionProofs dflags binds })
}
coreProgramEraseCoercionProofs :: DynFlags ->CoreProgram -> CoreProgram
coreProgramEraseCoercionProofs dflags topLevelBindings =
if not (gopt Opt_DoCoreLinting dflags) then
- flip map topLevelBindings $ \ x -> case e of
+ flip map topLevelBindings $ \ x -> case x of
NonRec v expr -> NonRec v $ coreExprEraseProof expr
Rec bindings -> Rec $ map (\(v,expr)-> (v,coreExprEraseProof expr)) bindings
else topLevelBindings
-coreExprEraseProof :: Expr b -> Expr b
+coreExprEraseProof :: CoreExpr -> CoreExpr
coreExprEraseProof e@(Var _) = e
coreExprEraseProof e@(Lit _) = e
-coreExprEraseProof (App f e) = App (coreExprEraseProof f) (coreExprEraseProof)
+coreExprEraseProof (App f e) = App (coreExprEraseProof f) (coreExprEraseProof e)
coreExprEraseProof (Lam v e) = Lam v $ coreExprEraseProof e
coreExprEraseProof (Let binder bod) = Let (eraseBinders binder) (coreExprEraseProof bod)
coreExprEraseProof (Case scrut v ty alts )=
@@ -40,9 +40,9 @@ coreExprEraseProof (Tick tick e)= Tick tick (coreExprEraseProof e)
coreExprEraseProof (Type t) = Type t
coreExprEraseProof (Coercion _)= Coercion ErasedCoercion
-eraseAltPfs :: Alt b -> Alt b
+eraseAltPfs :: CoreAlt -> CoreAlt
eraseAltPfs (con, vars, body) = (con,vars,coreExprEraseProof body)
-eraseBinders :: Bind b -> Bind b
+eraseBinders :: CoreBind -> CoreBind
eraseBinders(NonRec var rhs)= NonRec var $ coreExprEraseProof rhs
eraseBinders (Rec binders) = Rec $ map (\(v,e)-> (v,coreExprEraseProof e)) binders \ No newline at end of file