input-output-hk / io-sim

Haskell's IO simulator which closely follows core packages (base, async, stm).
https://hackage.haskell.org/package/io-sim
Apache License 2.0
37 stars 15 forks source link

CAD-4738 stm monad catch instance #16

Closed yogeshsajanikar closed 1 year ago

yogeshsajanikar commented 2 years ago

Based on the branch "CAD-4750-generalise-orelse-frame", this commit introduces Catch frame handler. It also adds Catch term in the reference STM for testing.

Resolves input-output-hk/ouroboros-network#1461

yogeshsajanikar commented 2 years ago

@coot Running the nightly tests now. I will update the results here soon.

yogeshsajanikar commented 2 years ago

@coot The tests that you mentioned pass!

Running tests in ouroboros-network with io-sim commit id 9d2e67fcb0ba066dba4803f3998b4ed2c98e1ada

cabal run ouroboros-network-framework:test -> All 47 tests passed (118.51s) cabal run ouroboros-network:test -> All 314 tests passed (480.21s)

yogeshsajanikar commented 1 year ago

https://github.com/input-output-hk/io-sim/pull/16#discussion_r1017076379 is being addressed here. https://github.com/input-output-hk/io-sim/pull/35. So now the catch term in this code drop is Catch :: Term t -> Term t -> Term t. The #35 handles exception. It also adds another exception type so that an exception can bubble up if the exception type is not handled. It is a WIP.