Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: caml-list@yquem.inria.fr
Subject: [Caml-list] Mixing variant types...
Date: Wed, 11 Jan 2006 22:56:09 +1300	[thread overview]
Message-ID: <ad8cfe7e0601110156y199b3ffegacaad8f59c40fec9@mail.gmail.com> (raw)

Hi,

I'm wondering why the following doesn't work:

let sources = (Event.receive internal_control) :: List.map (fun w ->
Channel.receive w.control) !windows in

where internal_control passes a (window,`New_window) event over the
channel, and w.control passes values of the type (window,event), where
type event = [ `Repaint ].

I thought that since they're both variant types, I should be able to
build a list that uses both variants.

Hmm, I just had a thought: is this because it's a tuple with the
variant inside the tuple?

Jonathan


             reply	other threads:[~2006-01-11  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11  9:56 Jonathan Roewen [this message]
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
2006-01-13  9:37           ` Jacques Garrigue
2006-01-12  3:59     ` 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=ad8cfe7e0601110156y199b3ffegacaad8f59c40fec9@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /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