1
Fork 0
Code samples for effect systems.
 
 
 
Go to file
Joshua Potter f32b0db1ce Clean up README. 2022-03-21 10:31:48 -04:00
.githooks Higher order effects. 2022-03-21 10:25:16 -04:00
src/Control/Monad Higher order effects. 2022-03-21 10:25:16 -04:00
.envrc Initial commit 2022-03-11 08:44:02 -05:00
.gitignore Initial commit 2022-03-11 08:44:02 -05:00
README.md Clean up README. 2022-03-21 10:31:48 -04:00
flake.lock Initial commit 2022-03-11 08:44:02 -05:00
flake.nix Free monads, first pass. 2022-03-13 15:08:29 -04:00
free-monads.cabal Higher order effects. 2022-03-21 10:25:16 -04:00
hie.yaml Initial commit 2022-03-11 08:44:02 -05:00

README.md

effect-systems

This repository contains collections of code snippets related to my Effect Systems blog post.

As Ive begun exploring the world of so-called algebraic effect systems, Ive become increasingly frustrated in the level of documentation around them. Learning to use them (and moreso understanding how they work) requires diving into library internals, watching various videos, and hoping to grok why certain effects arent being interpreted the way you might have hoped. My goal in this post is to address this issue, at least to some degree, in a focused, pedagogical fashion.

Building

This repository uses Nix for reproducible builds. First install Nix if you do not currently have it on your system. Afterward, enable flakes by adding line

experimental-features = nix-command flakes

to $HOME/.config/nix/nix.conf. You may then use nix build and nix develop. To makes things easier, we recommend using Home Manager to install direnv and nix-direnv. Once you run

$ direnv allow

from the root directory, nix develop will be automatically invoked each time a change is detected in flake.nix or you return to the directory.

Formatting

A pre-commit file is included in .githooks to ensure consistent formatting. Run the following to configure git to using it:

git config --local core.hooksPath .githooks/