Snippets tagged reversible computation

  • A reversible stateful execution workflow

    This is an attempt to define a workflow that contains reversible stateful computations. In the event of an exception being raised, all insofar successful operations will fold back to their original state. The implementation uses the notion of reversible computation primitives, which are composed using a free monad that is interpreted with a trampoline.

    6 people like this

    Posted: 4 years ago by Eirik Tsarpalis

  • Indexed Monads and Applications in F#

    Continuing from Nick Palladinos' session types, this snippet is an implementation of indexed monads in F#, as well as a collection of examples that demonstrate its utility: session types, type-safe serialization and reversible workflows.

    6 people like this

    Posted: 4 years ago by Eirik Tsarpalis

  • Session types

    This snippet is a direct adaptation of Nick Palladinos' Session Types found in http://fssnip.net/j5. The implementation eschews the need for explicit declaration of duality objects by encoding all relevant information in the session signature itself.

    3 people like this

    Posted: 4 years ago by Eirik Tsarpalis