An experimental Haskell library for programming with effectful runners.
Go to file
2019-10-22 11:28:01 +02:00
examples Moving around examples 2019-10-19 21:46:27 +02:00
src/Control Documentation 2019-10-22 11:28:01 +02:00
CHANGELOG.md Changelog 2019-10-05 00:20:24 +02:00
haskell-coop.cabal Documentation 2019-10-20 14:25:05 +02:00
LICENSE.md Moving the Haskell comodels library to a separate repository 2019-06-03 18:38:53 -07:00
Makefile Cleanup 2019-10-20 14:01:34 +02:00
README.md Readme 2019-10-21 11:07:18 +02:00
Setup.hs Moving the Haskell comodels library to a separate repository 2019-06-03 18:38:53 -07:00

Haskell-Coop

Haskell-Coop is an experimental Haskell library for programming with effectful runners. It is based on ongoing research of Danel Ahman and Andrej Bauer.

Until a proper publication about this research has appeared, you might want to check the talk Interacting with external resources using runners (aka comodels) for an overview of effectful runners and how we transform them into a programming language construct. 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).

Prerequisites

To build Haskell-Coop, you need a working installation of Haskell, and the Cabal package manager and build system.

Building haskell-coop

You can type:

  • make to locally build the Haskell-Coop library, generate documentation, and typecheck examples.
  • make build to locally build the Haskell-Coop library and generate documentation.
  • make examples to typecheck examples.
  • make clean to 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 dist-newstyle/build/platform/ghc-version/haskell-coop-version/doc/html/haskell-coop/index.html. The examples are typechecked with ghci.

Entry points

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/ contains various example runners that implement file IO, ML-style state, their combinations, ambient functions as present in the Koka language, etc.

Example uses of these runners can be found in examples/without_signals/ and examples/with_signals/.

Further documentation

Further documentation of the Haskell-Coop library can be found in its individual modules.

Acknowledgements

This project has received funding from the European Unions Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 834146.
This material is based upon work supported by the Air Force Office of Scientific Research under award number FA9550-17-1-0326.