origamitower / folktale

[not actively maintained!] A standard library for functional programming in JavaScript
https://folktale.origamitower.com/
MIT License
2.04k stars 102 forks source link

Investigate the possibility of adding algebraic effect handlers with a monad encoding #176

Open robotlolita opened 6 years ago

robotlolita commented 6 years ago

Forster, Kammar, Lindley and Pretnar compare the expressiveness of effects with different formulations in https://arxiv.org/abs/1610.09161, by defining rules for translating between each other. They note that translations from effect handlers into monads do not preserve well typedness in their type system.

If you're not familiar with algebraic effect handlers you should read Pretnar's tutorial: http://www.eff-lang.org/handlers-tutorial.pdf

Algebraic effects and handlers are very interesting to add to JS:

Possible problems:

cyberglot commented 5 years ago

pretty sure Niki's and Daan's paper on Koka talks about that.

Avaq commented 5 years ago

https://github.com/briancavalier/forgefx might be relevant.

robotlolita commented 5 years ago

@cyberglot mmh, is it published yet, and do you have a link/name for that paper? The ones linked in the Koka page don't have any coauthor or seem to involve monads from the abstract.

robotlolita commented 5 years ago

Oh, nevermind, I found it going to Niki's page (assuming it's this one http://goto.ucsd.edu/~nvazou/koka/padl16.pdf)

cyberglot commented 5 years ago

@robotlolita yep, that one.