Skip to content

Commit bbc1e07

Browse files
committed
Improve show of ScheduleMod
1 parent 72dd95c commit bbc1e07

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

io-sim/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- Support `threadLabel` (`io-classes-1.8`)
66
- `IOSimPOR`'s `Effect` traces now will correctly show labels on read/written
77
`TVars`.
8+
- `Show` instance for `ScheduleMod` now prints `ThreadId`s in a slightly nicer
9+
way, matching the way those steps would be traced in the `SimTrace`.
810

911
## 1.6.0.0
1012

io-sim/src/Control/Monad/IOSimPOR/Types.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ instance Show ScheduleMod where
171171
showsPrec d (ScheduleMod tgt ctrl insertion) =
172172
showParen (d>10) $
173173
showString "ScheduleMod " .
174-
showsPrec 11 tgt .
174+
showParen True (showString (ppStepId tgt)) .
175175
showString " " .
176176
showsPrec 11 ctrl .
177-
showString " " .
178-
showsPrec 11 insertion
177+
showString " [" .
178+
showString (List.intercalate "," (map ppStepId insertion)) .
179+
showString "]"
179180

180181
--
181182
-- Steps

0 commit comments

Comments
 (0)