From: Mart Lubbers Date: Fri, 20 May 2016 14:39:18 +0000 (+0200) Subject: add last exception for functype X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=25ec6159420cebad454f7b4114a454d852cc2480;p=cc1516.git add last exception for functype --- diff --git a/sem.icl b/sem.icl index 668bbeb..e714dbf 100644 --- a/sem.icl +++ b/sem.icl @@ -143,6 +143,7 @@ unify (TupleType (ta1,ta2)) (TupleType (tb1,tb2)) = unify ta1 tb1 >>= \s1-> unify ta2 tb2 >>= \s2-> Right $ compose s1 s2 unify (ListType t1) (ListType t2) = unify t1 t2 +unify (FuncType t1) (FuncType t2) = unify t1 t2 unify t1 t2 | t1 == t2 = Right zero | otherwise = Left $ UnifyError zero t1 t2