Browse thread
[Caml-list] Mixing variant types...
- Jonathan Roewen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | [Caml-list] Mixing variant types... |
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