[Haskell-cafe] Non-deterministic function/expression types in Haskell?

J. Garrett Morris jgbm at acm.org
Fri Jan 12 00:53:28 UTC 2018


On Thu, Jan 11, 2018 at 1:41 PM, Benjamin Redelings
<benjamin.redelings at gmail.com> wrote:
> (a) why are monads a perfect solution to my problem?
> (b) can we extend the HM type system to support non-determinism directly?

Yes, there are type systems that express effects differently.  No,
they don't really do anything different than monads would do.

The classic paper on the subject is probably Wadler's "The Marriage of
Effects and Monads".

http://homepages.inf.ed.ac.uk/wadler/papers/effectstocl/effectstocl.pdf

That said, there are a variety of other language features building on
the idea of effects.  Look for any of the literature on algebraic
effects or effect handlers.  Many of them use non-determinism as an
example.

 /g


-- 
Prosperum ac felix scelus virtus vocatur
 -- Seneca


More information about the Haskell-Cafe mailing list