Skip to content

Commit d4679fa

Browse files
committed
Include substitution when pretty-printing Pattern
1 parent 79b5d4d commit d4679fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

booster/library/Booster/Log.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import Booster.Pattern.Base (
6868
TermAttributes (hash),
6969
pattern AndTerm,
7070
)
71+
import Booster.Pattern.Bool (asEquations)
7172
import Booster.Pattern.Pretty
7273
import Booster.Prettyprinter (renderOneLineText)
7374
import Booster.Syntax.Json (KorePattern, addHeader, prettyPattern)
@@ -185,8 +186,8 @@ withTermContext t@(Term attrs _) m =
185186
m
186187

187188
withPatternContext :: LoggerMIO m => Pattern -> m a -> m a
188-
withPatternContext Pattern{term, constraints} m =
189-
let t' = foldl' AndTerm term $ Set.toList $ Set.map coerce constraints -- FIXME
189+
withPatternContext Pattern{term, constraints, substitution} m =
190+
let t' = foldl' AndTerm term . map coerce $ Set.toList constraints <> asEquations substitution
190191
in withTermContext t' m
191192

192193
instance ToLogFormat KorePattern where

0 commit comments

Comments
 (0)