Commit 0b2702b3 authored by André Pacak's avatar André Pacak

fix copy paste error

parent d93f4fe9
......@@ -146,7 +146,8 @@ lookup tymap t x = case parent t of
if name == x
then do
ty <- requiredType tymap p
(ty1, ty2) <- matchFun ty (show p)
rty <- matchTypeVar tymap ty
(ty1, ty2) <- matchFun rty (show p)
return ty1
else lookup tymap p x
Just p@(InL term _) -> do
......@@ -157,14 +158,16 @@ lookup tymap t x = case parent t of
if n1 == x
then do
ety <- inferType tymap e
(ty1, ty2) <- matchSum ety (show e)
rty <- matchTypeVar tymap ety
(ty1, ty2) <- matchSum rty (show e)
return ty1
else lookup tymap p x
Just p@(Case e n1 t1 n2 t2 _) | t == t2 ->
if n2 == x
then do
ety <- inferType tymap e
(ty1, ty2) <- matchSum ety (show e)
rty <- matchTypeVar tymap ety
(ty1, ty2) <- matchSum rty (show e)
return ty2
else lookup tymap p x
Just p@(Tag n t' _) | t == t' -> do
......@@ -173,7 +176,8 @@ lookup tymap t x = case parent t of
lookup tymap p x
Just p@(Match m cases _) | t /= m -> do
ety <- inferType tymap m
typeMap <- matchVariant ety (show m)
rty <- matchTypeVar tymap ety
typeMap <- matchVariant rty (show m)
let ml = find (\(_, x', t') -> t == t' && x == x') cases
if isJust ml
then do
......
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