Skip to content

Commit 0521547

Browse files
committed
Merge remote-tracking branch 'origin/master' into release
2 parents 30450a8 + aa2aeb9 commit 0521547

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

booster/library/Booster/Pattern/ApplyEquations.hs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -873,18 +873,20 @@ applyEquation ::
873873
EquationT
874874
io
875875
(Either ((EquationT io () -> EquationT io ()) -> EquationT io (), ApplyEquationFailure) Term)
876-
applyEquation (FunctionApplication _sym [] [Term term _]) rule
876+
applyEquation (FunctionApplication _sym [] [term]) rule
877877
| isSortPredicate rule
878-
, not term.isEvaluated =
878+
, KSeq _ (FunctionApplication _ _ _) <- term =
879879
-- sort predicates only match on a sort injection, unevaluated
880880
-- function applications may create false negatives
881-
getPrettyModifiers >>= \case
882-
ModifiersRep (_ :: FromModifiersT mods => Proxy mods) -> do
883-
pure $
884-
Left
885-
( \ctxt -> ctxt $ logWarn "Refusing to apply sort predicate rule to an unevaluated term"
886-
, IndeterminateMatch
887-
)
881+
pure $
882+
Left
883+
( \ctxt ->
884+
ctxt $
885+
withTermContext term $
886+
withContext CtxWarn $
887+
logMessage ("Refusing to apply sort predicate rule to an unevaluated term" :: Text)
888+
, IndeterminateMatch
889+
)
888890
applyEquation term rule =
889891
runExceptT $
890892
getPrettyModifiers >>= \case

0 commit comments

Comments
 (0)