Skip to content

Add support for nested exception testing in Test/STM #36

Open

Description

@yogeshsajanikar

Is your feature request related to a problem? Please describe.
Test/STM.hs contains a toy DSL which can be evaluated in a pure as well as the STM context. It is used to test the correctness of the io-sim STM implementation. The PR #16 implements the support for MonadCatch. However, the test code does not have support for nested exceptions. Adding a support for nested exception evaluation in Test/STM will make it a complete.

Describe the solution you'd like

  • Add a support for multiple exception values (Currently ImmValue is treated as an exception type).
  • Add another exception type (E.g. ImmValueException so that catch handler can do a type check).
  • Make necessary changes to Expr generator and Expr evaluation.

Describe alternatives you've considered

  • Write a test which runs in io-sim and io and has nested exception. However, it will be a unit test and will not test various scenarios when a test is generated through Expr generator.

Additional context
NA

Are you willing to implement it?

  • Are you? 😃 - Already started working on it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementio-sim

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions