mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Unify sums.
This commit is contained in:
parent
7ca6fd736e
commit
a755d14188
@ -83,6 +83,7 @@ unify Null b = pure b
|
||||
unify (Var _) b = pure b
|
||||
unify a (Var _) = pure a
|
||||
unify (Array t1) (Array t2) = Array <$> unify t1 t2
|
||||
unify (a1 :+ b1) (a2 :+ b2) = (:+) <$> unify a1 a2 <*> unify b1 b2
|
||||
unify (a1 :* b1) (a2 :* b2) = (:*) <$> unify a1 a2 <*> unify b1 b2
|
||||
unify t1 t2
|
||||
| t1 == t2 = pure t2
|
||||
|
Loading…
Reference in New Issue
Block a user