lookName error msg for debugging
authorSimon Huber <hubsim@gmail.com>
Sat, 18 Apr 2015 11:49:45 +0000 (13:49 +0200)
committerSimon Huber <hubsim@gmail.com>
Sat, 18 Apr 2015 11:49:45 +0000 (13:49 +0200)
Eval.hs

diff --git a/Eval.hs b/Eval.hs
index 967586575496111180a58bc0328f456ca567c2b6..7869b9283bb0385382def98a24f01aa90e5c062a 100644 (file)
--- a/Eval.hs
+++ b/Eval.hs
@@ -27,6 +27,7 @@ lookType x r@(Def rho r1) = case lookup x rho of
 lookType x (Sub rho _) = lookType x rho
 
 lookName :: Name -> Env -> Formula
+lookName i Empty       = error $ "lookName: not found " ++ show i
 lookName i (Upd rho _) = lookName i rho
 lookName i (Def _ rho) = lookName i rho
 lookName i (Sub rho (j,phi)) | i == j    = phi