Commit d93f4fe9 authored by André Pacak's avatar André Pacak

do not matchTypeVar at annotations

parent c97951ae
......@@ -93,8 +93,7 @@ inferType ctx tymap (Let name t body _) = do
tyt <- inferType ctx tymap t
inferType (Bind ctx name tyt) tymap body
inferType ctx tymap (Anno term ty _) = do
rty <- matchTypeVar tymap ty
checkType ctx tymap term rty
checkType ctx tymap term ty
return ty
inferType ctx tymap (App t1 t2 _) = do
ty <- inferType ctx tymap t1
......
......@@ -93,8 +93,7 @@ inferType ctx tymap (Let name t body _) = do
tyt <- inferType ctx tymap t
inferType (Bind ctx name tyt) tymap body
inferType ctx tymap (Anno term ty _) = do
rty <- matchTypeVar tymap ty
checkType ctx tymap term rty
checkType ctx tymap term ty
return ty
inferType ctx tymap (App t1 t2 _) = do
ty <- inferType ctx tymap t1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment