projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make subeverywhere complain for unknown expressions.
[matthijs/master-project/cλash.git]
/
NormalizeTools.hs
diff --git
a/NormalizeTools.hs
b/NormalizeTools.hs
index 400bf88bfa503e12232ef5ddac1ff8868b01c20b..c20c58349491ee5aa75a5fe8348fe1fa4623ca13 100644
(file)
--- a/
NormalizeTools.hs
+++ b/
NormalizeTools.hs
@@
-142,9
+142,12
@@
subeverywhere trans (Case scrut b t alts) = do
transalt (con, binders, expr) = do
expr' <- trans expr
return (con, binders, expr')
transalt (con, binders, expr) = do
expr' <- trans expr
return (con, binders, expr')
-
-subeverywhere trans expr = return expr
+subeverywhere trans (Var x) = return $ Var x
+subeverywhere trans (Lit x) = return $ Lit x
+subeverywhere trans (Type x) = return $ Type x
+
+subeverywhere trans expr = error $ "NormalizeTools.subeverywhere Unsupported expression: " ++ show expr
-- Apply the given transformation to all expressions, except for direct
-- arguments of an application
-- Apply the given transformation to all expressions, except for direct
-- arguments of an application