Skip to content

An experimental and still heavily in progress Haskell effect system library supporting coroutines and higher order effects.

License

Notifications You must be signed in to change notification settings

jhgarner/Theseus

Repository files navigation

Theseus

Welcome to the hub for Theseus, an effect system library for Haskell. Theseus is an effect system that supports algebraic effects (including Coroutine), many higher order effects, and is designed so that semantics do not change when effects are reordered.

We'll explore how, much like the Ship of Theseus, programs can be deconstructed and rebuilt without changing what they are.

Guides

Theseus contains several annotated source files transformed into docs using Docco. Those are the best place to learn more about Theseus.

For getting started, there are a couple good places:

  • The tutorial is the best starting place. If you're new to effect systems, it should bring you up to speed with a couple of examples. If you're only new to Theseus, it'll cover some of what makes Theseus unique.
  • The File example showcases Theseus' main feature. If you're experienced with effect systems and want to know what makes Theseus special, look there.

The builtin effects are useful to walk through as well since they cover the range of Theseus' complexity.

Finally there are the inner workings. These might be helpful while you're looking into the more complicated effects.

Shoutouts

There are some other amazing effect system libraries in Haskell exploring this space. A non-exhaustive list of ones I'm familiar with are:

  • Fused-effects and Polysemy use a freer monad and Weave abstraction. They support a large number of higher order effects, but sacrifice some of the richer algebraic effects (like Coroutine) in the process.
  • Eff approaches it with delimited continuations. Eff finds great success supporting the algebraic effects, but runs into more problems with the higher order effects.
  • Bluefin, Effectful, and Cleff use a ReaderT IO based approach. They sacrifice even more of the algebraic effects (NonDet) for speed and ecosystem interoperability.
  • Heftia's approach supports the full gamut of algebraic and higher order effects. In exchange for all that support, it limits when richer algebraic effects can run.

Theseus, compared to those, is most similar to the free/freer effect systems. It changes some of the algebraic effect semantics (the biggest being that Choice is more breadth first than depth first), but in exchange has higher order effects and algebraic effects that play well with each other.

About

An experimental and still heavily in progress Haskell effect system library supporting coroutines and higher order effects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published