GithubHelp home page GithubHelp logo

vimcy7 / effects-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocaml-multicore/effects-examples

0.0 0.0 0.0 178 KB

Examples to illustrate the use of algebraic effects in Multicore OCaml

License: ISC License

C 0.72% OCaml 95.34% Haskell 2.11% Makefile 1.83%

effects-examples's Introduction

OCaml effects examples

Build Status

Examples to illustrate the use of algebraic effects in OCaml. See

Examples

The original implementation of Multicore OCaml allowed a user to Obj.clone_continuation. This has been removed, the examples that used this are in the multishot directory. See this conversation about the removal of this feature. They now use the ocaml-multicont library.

Running the examples

To run the examples with Multicore OCaml, be sure to install Opam with these instructions. If your version of Opam (opam --version) is greater than or equal to 2.1 then the following instructions will work:

# After cloning this repository, create a 5.0.0 switch
opam update
# Add the alpha repository to get unreleased 5.0.0 compatible libraries
opam switch create 5.0.0+trunk --repo=default,alpha=git+https://github.com/kit-ty-kate/opam-alpha-repository.git
opam install . --deps-only

If your version of Opam is less than 2.1, then you will also need to add the beta repository when creating the switch. All of the other commands remain the same.

opam switch create 5.0.0+trunk --repo=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git,alpha=git+https://github.com/kit-ty-kate/opam-alpha-repository.git

Running make will build all of the examples. If you want to run a single executable that is built with dune you can run:

$ dune exec -- ./<executable_name>.exe

External examples

These are other examples that utilise OCaml effect handlers that are not in this repo:

Citation

If you are citing this work in an academic paper, please cite the PLDI 2021 paper "Retrofitting Effect Handlers onto OCaml": https://dl.acm.org/doi/10.1145/3453483.3454039.

effects-examples's People

Contributors

kayceesrk avatar dhil avatar patricoferris avatar yallop avatar sudha247 avatar ilsordo avatar shubhamkumar13 avatar gmevel avatar bracevac avatar bobatkey avatar shreyas-21 avatar samoht avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.