Haskell-Coop is an experimental Haskell library for programming with effectful runners.
This library is based on ongoing research of Danel Ahman and Andrej Bauer. Interested readers should check out a recent draft Runners in action that develops the theoretical underpinnings, presents a core calculus for programming with runners that the Haskell-Coop library implements, and discusses various example uses of runners.
For general background reading on algebraic effects and handlers, we recommend the lecture notes What is algebraic about algebraic effects and handlers?. Section 4 of these lecture notes discusses ordinary runners of algebraic effects (also known in the literature as comodels of algebraic effects).
You can type:
maketo locally build the Haskell-Coop library, generate documentation, and typecheck examples.
make buildto locally build the Haskell-Coop library and generate documentation.
make examplesto typecheck examples.
make cleanto clean up.
Building Haskell-Coop uses
cabal new-build to locally build the library and all its dependencies,
and to generate Haddock documentation. The generated documentation can be found in
The examples are typechecked with
There are two main entry points to the Haskell-Coop library:
- src/Control/Runner.hs that implements a restricted form of effectful runners (without exceptions and signals).
- src/Control/SignalRunner.hs that implements the general form of effectful runners (with exceptions and signals).
The directories src/Control/Runner/ and src/Control/SignalRunner/ contain various example runners that implement file IO, ML-style state, their combinations, ambient functions as present in the Koka language, etc.
Further documentation of the Haskell-Coop library can be found in its individual modules.