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

fix minor

parent aacb618a
...@@ -58,7 +58,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type ...@@ -58,7 +58,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type
lookupTypeVar Empty x = fail $ "Unbound type variable " ++ show x lookupTypeVar Empty x = fail $ "Unbound type variable " ++ show x
lookupTypeVar (Bind c x t) y lookupTypeVar (Bind c x t) y
| x == y = return t | x == y = return t
| otherwise = lookup c y | otherwise = lookupTypeVar c y
matchTypeVar :: TypeMap -> Type -> Infer Type matchTypeVar :: TypeMap -> Type -> Infer Type
matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x
......
...@@ -103,7 +103,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type ...@@ -103,7 +103,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type
lookupTypeVar Empty x = fail ["Unbound type variable " ++ show x] lookupTypeVar Empty x = fail ["Unbound type variable " ++ show x]
lookupTypeVar (Bind c x t) y lookupTypeVar (Bind c x t) y
| x == y = return t | x == y = return t
| otherwise = lookup c y | otherwise = lookupTypeVar c y
matchTypeVar :: TypeMap -> Type -> Infer Type matchTypeVar :: TypeMap -> Type -> Infer Type
matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x
......
...@@ -103,7 +103,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type ...@@ -103,7 +103,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type
lookupTypeVar Empty x = fail ["Unbound type variable " ++ show x] lookupTypeVar Empty x = fail ["Unbound type variable " ++ show x]
lookupTypeVar (Bind c x t) y lookupTypeVar (Bind c x t) y
| x == y = return t | x == y = return t
| otherwise = lookup c y | otherwise = lookupTypeVar c y
matchTypeVar :: TypeMap -> Type -> Infer Type matchTypeVar :: TypeMap -> Type -> Infer Type
matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x
......
...@@ -58,7 +58,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type ...@@ -58,7 +58,7 @@ lookupTypeVar :: TypeMap -> Name -> Infer Type
lookupTypeVar Empty x = fail $ "Unbound type variable " ++ show x lookupTypeVar Empty x = fail $ "Unbound type variable " ++ show x
lookupTypeVar (Bind c x t) y lookupTypeVar (Bind c x t) y
| x == y = return t | x == y = return t
| otherwise = lookup c y | otherwise = lookupTypeVar c y
matchTypeVar :: TypeMap -> Type -> Infer Type matchTypeVar :: TypeMap -> Type -> Infer Type
matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x matchTypeVar tymap (TypeVar x) = lookupTypeVar tymap x
......
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