Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the Eff-monad in purescript inspired by www.eff-lang.org?

Reading about the Eff-Language, I wondered if there are similar ideas already in use. The Eff-Language mentions a paper called "Inferring Algebraic Effects", which describes the algorithm that Eff uses to infer effects. Are there similarities?

like image 899
v217 Avatar asked May 01 '15 20:05

v217


1 Answers

I was aware of Eff when I wrote the effects system in PureScript, so you might say it was inspired by it. Another source of inspiration was the Koka programming language, in particular the paper "Koka: Programming with Row Polymorphic Effect Types". Given PureScript already had row types for dealing with records, it made sense to try to repurpose it for use as an effect system.

PureScript uses an effect monad called Eff (no relation!) to handle "native" effects (that is, effects provided by the runtime system, not "userland" effects like you might model using monad transformers in Haskell). Eff is a lot like Haskell's IO, but refined by a row of effect types. So the path to row-based effects in PureScript was very simple - we just had to allow rows to contain types with kinds other than *.

like image 190
Phil Freeman Avatar answered Sep 29 '22 11:09

Phil Freeman