Skip to content

Commit

Permalink
Merge pull request #114 from input-output-hk/coot/refactor-io-sim-por
Browse files Browse the repository at this point in the history
Refactor IOSimPOR
  • Loading branch information
coot committed Sep 27, 2023
2 parents b1b9811 + 5d15651 commit 892076e
Show file tree
Hide file tree
Showing 15 changed files with 1,170 additions and 676 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

index-state:
, hackage.haskell.org 2023-03-25T12:00:00Z
, hackage.haskell.org 2023-09-20T00:00:00Z
, cardano-haskell-packages 2022-11-15T17:30:00Z

-- TODO: early ghc-9.6 support
Expand Down
30 changes: 30 additions & 0 deletions io-sim/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Revsion history of io-sim

## next

### Breaking changes

#### Breaking changes

* Renamed `ThreadId` to `IOSimThreadId` to avoid a clash with `ThreadId`
associated type family of `MonadFork`. It makes it much simpler to paste
failing `ScheduleControl` in `ghci` or tests.
* `BlockedReason` was modified: `BlockedOnOther` was removed, in favour of `BlockedOnDelay` and `BlockOnThrowTo`.
* The `Failure` type (for example returned by `runSim`) now also contains
a constructor for internal failures. This improved error reporting when
there's a bug in `IOSimPOR`. Currently it's only used by some of the
assertions in `IOSimPOR`.

#### Non breaking changes

* Refactored the internal API to avoid `unsafePerformIO`.
* Fixed bugs which lead to discovery of schedules which are impossible to run.
* Added haddocks, refactored the code base to improve readability.
* Fixed reported `step` in `EventTxWakup`
* Added debugging information schedule, (`explorationDebugLevel` option).
Mostly useful for debugging `IOSimPOR` itself. This information will
contains `Effect`, discovered races and schedules.
* Addded or improved pretty printers for `SimTrace`. Among other changes,
a racy `StepId`: `(RacyThreadId [1,2], 2)`, is now pretty printed as `Thread
{1,2}.2`, a non racy step is printed as `Thread [1,2].2`.
* Fixed trace of calls to the `deschedule` function.
* Exposed `Timeout` type as part of the `newTimeout` API.

## 1.2.0.0

### Breaking changes
Expand Down
4 changes: 2 additions & 2 deletions io-sim/io-sim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ library
containers,
deepseq,
nothunks,
parallel,
psqueues >=0.2 && <0.3,
strict-stm ^>=1.2,
si-timers ^>=1.2,
Expand Down Expand Up @@ -108,7 +107,6 @@ test-suite test
containers,
io-classes,
io-sim,
parallel,
QuickCheck,
si-timers,
strict-stm,
Expand All @@ -117,6 +115,8 @@ test-suite test
tasty-hunit,
time
ghc-options: -fno-ignore-asserts
-rtsopts
-- -threaded

benchmark bench
import: warnings
Expand Down
Loading

0 comments on commit 892076e

Please sign in to comment.