mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Note a bug in unify.
This commit is contained in:
parent
9aa0ae2f32
commit
7802356d85
@ -30,5 +30,6 @@ unify (a1 :-> b1) (a2 :-> b2) = (:->) <$> unify a1 a2 <*> unify b1 b2
|
||||
unify (a1 :* b1) (a2 :* b2) = (:*) <$> unify a1 a2 <*> unify b1 b2
|
||||
unify (TVar _) b = pure b
|
||||
unify a (TVar _) = pure a
|
||||
-- FIXME: this can succeed incorrectly for lists of inequal length.
|
||||
unify (TArr as) (TArr bs) = TArr <$> for (zip as bs) (uncurry unify)
|
||||
unify t1 t2 = fail ("cannot unify " ++ show t1 ++ " with " ++ show t2)
|
||||
|
Loading…
Reference in New Issue
Block a user