From 17a18d09526365443a710bb1fb7728d5c1f8ceea Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 13 Apr 2016 22:14:59 +0200 Subject: [PATCH] - --- sem.icl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sem.icl b/sem.icl index 66d9024..475d093 100644 --- a/sem.icl +++ b/sem.icl @@ -135,7 +135,7 @@ typeExpr (VarExpr p (VarDef ident fs)) = gets (\(st, r)->'Map'.get ident st) Just t = unify t fs typeOp2 :: Expr Expr Op2 [Type] Type -> Env Type typeOp2 e1 e2 op ts ret = typeExpr e1 >>= \t1-> typeExpr e2 >>= \t2-> - unify t1 t2 >>= \t3->if (isMember t3 ts) (pure ret) + unify t1 t2 >>= \t3->if (isMember t3 [IdType "":ts]) (pure ret) (liftT $ Left $ OperatorError (extrPos e1) op t3) buildFunctionType :: String [Expr] -> Env Type -- 2.20.1