Skip to content

Commit

Permalink
Make unify less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
nick8325 committed Sep 13, 2017
1 parent c88e8ec commit 78ee654
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Twee/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ unify t u = unifyList (singleton t) (singleton u)
unifyList :: TermList f -> TermList f -> Maybe (Subst f)
unifyList t u = do
sub <- unifyListTri t u
return $! close sub
-- Not strict so that isJust (unify t u) doesn't force the substitution
return (close sub)

unifyTri :: Term f -> Term f -> Maybe (TriangleSubst f)
unifyTri t u = unifyListTri (singleton t) (singleton u)
Expand Down

0 comments on commit 78ee654

Please sign in to comment.