From: skaller <skaller@users.sourceforge.net>
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Mixing variant types...
Date: Fri, 13 Jan 2006 18:56:32 +1100 [thread overview]
Message-ID: <1137138992.3681.462.camel@rosella> (raw)
In-Reply-To: <20060113.135716.226786926.garrigue@math.nagoya-u.ac.jp>
On Fri, 2006-01-13 at 13:57 +0900, Jacques Garrigue wrote:
> From: skaller <skaller@users.sourceforge.net>
>> (* event.ml *)
>> type +'a event =
>> Communication of 'a behavior
>> | Choose of 'a event list
>> | WrapAbort of 'a event * (unit -> unit)
>> | Guard of (unit -> 'a event)
> The + above is not needed (it is implied by the definition)
But it would fail if the type is not in fact covariant
in its argument?
> You still need to coerce the resulting list:
> (List.map (fun w -> receive w.control) !windows :> ws_event list)
Still doesn't seem to work: OUCH! Yes it DOES. Argg..
I modified
otherlibs/threads/event.*
but I didn't modify
otherlibs/systhreads/event.*
So when I compile with -thread it doesn't work.
But when I compile with -vmthread it does work.
Which is pretty conclusive proof the patch does work
in at least one case. And if I'm right, the + in
the implementation proves covariance mechanically so
it should be safe.
Should I add a feature request to the bug tracker?
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2006-01-13 7:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-11 10:36 Jonathan Roewen
2006-01-12 1:24 ` Jonathan Roewen
2006-01-12 2:45 ` skaller
2006-01-12 3:22 ` Jacques Garrigue
2006-01-12 3:57 ` skaller
2006-01-13 4:57 ` Jacques Garrigue
2006-01-13 7:56 ` skaller [this message]
2006-01-13 9:37 ` Jacques Garrigue
2006-01-12 3:59 ` Jonathan Roewen
-- strict thread matches above, loose matches on Subject: below --
2006-01-11 9:56 Jonathan Roewen
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=1137138992.3681.462.camel@rosella \
--to=skaller@users.sourceforge.net \
--cc=caml-list@yquem.inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
/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