GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - RedPRL/algaeff: 🦠 Reusable components based on algebraic effects

BranchesTags
Open more actions menu

Latest commit

 

History

78 Commits
78 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG.markdown
CHANGELOG.markdown
 
 
CONTRIBUTING.markdown
CONTRIBUTING.markdown
 
 
CONTRIBUTORS.markdown
CONTRIBUTORS.markdown
 
 
LICENSE
LICENSE
 
 
README.markdown
README.markdown
 
 
algaeff.opam
algaeff.opam
 
 
dune-project
dune-project
 
 

Repository files navigation

🦠 Reusable Effects-Based Components

This library aims to collect reusable, general effects-based components we have seen when constructing our proof assistants using OCaml 5. All components here have appeared in various tutorials on algebraic effects; algaeff wraps these well-known components into an OPAM package.

API Stability

We use semantic versioning. Breaking changes will bump the major version number.

Components

  • Algaeff.State: mutable states
  • Algaeff.Reader: read-only environments
  • Algaeff.Sequencer: making a Seq.t
  • Algaeff.Mutex: simple locking to prevent re-entrance
  • Algaeff.UniqueID: generating unique IDs

Effects-based concurrency (cooperative lightweight threading) was already tackled by other libraries such as Eio and Affect. This library focuses on the rest.

There are a few other useful functions:

  • Algaeff.Fun.Deep.finally: call continue or discontinue accordingly.
  • Algaeff.Fun.Shallow.finally_with: same as above, but for shallow effect handlers.

How to Use It

OCaml >= 5.0.0

You need OCaml 5.

Example Code

module S = Algaeff.State.Make (Int)

let forty_two = S.run ~init:100 @@ fun () ->
  print_int (S.get ()); (* this will print out 100 *)
  S.set 42;
  S.get ()

Documentation

Here is the API documentation.

About

🦠 Reusable components based on algebraic effects

Topics

algebraic-effectsocamlocaml-library

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

55 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.