Fix a bug in unification (lol)

This commit is contained in:
Danila Fedorin 2023-11-25 23:08:05 -08:00
parent a9163c0797
commit 824b19123e

View File

@ -65,7 +65,7 @@ unifyList l1 l2 us =
case (l1, l2) of
(t1 :: ts1, t2 :: ts2) ->
unify t1 t2 us
|> Maybe.andThen (\(t, usp) -> unifyList ts1 ts2 usp)
|> Maybe.andThen (\(t, usp) -> Maybe.map (Tuple.mapFirst (\ts -> t :: ts)) (unifyList ts1 ts2 usp))
([], []) -> Just ([], us)
_ -> Nothing