[make unification and matching of E terms  handle lambdas properly
John Meacham <john@repetae.net>**20060222051658] hunk ./E/Eval.hs 51
-unify e1 e2 = liftM Seq.toList $ execWriterT (un e1 e2 () (0::Int)) where
+unify e1 e2 = liftM Seq.toList $ execWriterT (un e1 e2 () (-2::Int)) where
+    un _ _ _ c | c `seq` False = undefined
hunk ./E/Eval.hs 56
-    un a@(EVar (TVr { tvrIdent = (i), tvrType =  t}))  b@(EVar (TVr { tvrIdent = ( j), tvrType =  u})) mm c = do
+    un a@(EVar (TVr { tvrIdent = i, tvrType =  t}))  b@(EVar (TVr { tvrIdent = j, tvrType =  u})) mm c | i == j || (i > 0 && j > 0) = do
hunk ./E/Eval.hs 77
-        un ea eb mm c
+        un (subst va (EVar va { tvrIdent = c }) ea) (subst vb (EVar vb { tvrIdent = c }) eb) mm (c - 2)
hunk ./E/TypeCheck.hs 289
-match lup vs = \e1 e2 -> liftM Seq.toList $ execWriterT (un e1 e2 () (0::Int)) where
+match lup vs = \e1 e2 -> liftM Seq.toList $ execWriterT (un e1 e2 () (-2::Int)) where
hunk ./E/TypeCheck.hs 292
+    un _ _ _ c | c `seq` False = undefined
hunk ./E/TypeCheck.hs 308
+    un (EVar TVr { tvrIdent = i, tvrType =  t}) (EVar TVr {tvrIdent = j, tvrType =  u}) mm c | i < 0 || j < 0  = fail "Expressions don't match"
hunk ./E/TypeCheck.hs 316
-        un ea eb mm c
+        un (subst va (EVar va { tvrIdent = c }) ea) (subst vb (EVar vb { tvrIdent = c }) eb) mm (c - 2)