repositories
/
cc1516.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
302891e
)
-
author
Mart Lubbers
<mart@martlubbers.net>
Wed, 13 Apr 2016 20:14:59 +0000
(22:14 +0200)
committer
Mart Lubbers
<mart@martlubbers.net>
Wed, 13 Apr 2016 20:14:59 +0000
(22:14 +0200)
sem.icl
patch
|
blob
|
history
diff --git
a/sem.icl
b/sem.icl
index
66d9024
..
475d093
100644
(file)
--- 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