
On Thu, Jan 11, 2018 at 1:41 PM, Benjamin Redelings
(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