From: Gabriel Kerneis <kerneis@pps.jussieu.fr>
To: Dawid Toton <dawid.toton@uj.edu.pl>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] 'Nondeterministic' evaluation wrt exceptions
Date: Fri, 25 Jul 2008 17:46:06 +0200 [thread overview]
Message-ID: <20080725154606.GC4803@kerneis.info> (raw)
In-Reply-To: <4889F16B.3020903@uj.edu.pl>
On Fri, Jul 25, 2008 at 04:29:47PM +0100, Dawid Toton wrote:
> I have no idea what code the syntax extension should produce. My first
> guess is to wrap everything in
> type 'a wrapped = Exception | Value 'a
> and make all aplications evaluated. But this seems to be a big headache.
> Maybe this is well-known, already solved problem? Any ideas?
The wrapping you describe looks a lot like a monad, and your problem
definitely looks like having many (cooperative) threads, some of them needing
to be detached (because they are blocking).
You could have a look at http://ocsigen.org/lwt and adapt it to suit your
needs. Pay attention in particular to the detach() function.
Please, note I might be seeing monads and continuation-passing style
everywhere, since this is my current research topic.
Regards,
--
Gabriel Kerneis
next prev parent reply other threads:[~2008-07-25 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 15:29 Dawid Toton
2008-07-25 15:46 ` Gabriel Kerneis [this message]
2008-07-25 16:20 ` [Caml-list] " Xavier Leroy
2008-07-25 19:29 ` Dawid Toton
2008-07-25 20:10 ` Christophe TROESTLER
2008-07-25 20:31 ` Zheng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080725154606.GC4803@kerneis.info \
--to=kerneis@pps.jussieu.fr \
--cc=caml-list@yquem.inria.fr \
--cc=dawid.toton@uj.edu.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox