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

Oleg Grenrus oleg.grenrus at iki.fi
Thu Jan 11 20:02:34 UTC 2018


(a) Non-determism is an effect, e.g. simple list is non-determinism
monad, for small discrete distributions!
(b) Yes. We can write effectful code "implicitly"
  - You might look into *Automatically Escaping Monads*
  - https://www.youtube.com/watch?v=wG8AErq6Bbo, slides:
http://benl.ouroborus.net/talks/2016-HIW-Escape.pdf
  - http://disciple.ouroborus.net/ or https://github.com/DDCSF/ddc

Interstingly, while searching for the paper, I stumbled upon Oleg
Kiselyov's  (not me) paper from
*Effects Without Monads: Non-determinism*, which is a different approach.
Maybe that's what you are looking after
http://okmij.org/ftp/tagless-final/nondet-paper.pdf

- Oleg

On 11.01.2018 21:41, Benjamin Redelings wrote:
> Hi Oleg,
>
> I like monads, really I do.  I am just not asking a question about how
> I can (or should) use monads.
>
> I guess we can split my question into two branches:
> (a) why are monads a perfect solution to my problem?
> (b) can we extend the HM type system to support non-determinism directly?
>
> What I am actually interested in is (b), so I don't want to get
> sidetracked with (a) if it means ignoring (b).  I will think if I can
> respond to (a) without completely getting side-tracked and ignoring
> (b).  Does that make sense?
>
> take care,
>
> -BenRI
>
> P.S. Thanks for the links!
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xB8BB0BA4.asc
Type: application/pgp-keys
Size: 28502 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180111/017a2855/attachment.key>


More information about the Haskell-Cafe mailing list