From: Christophe Raffalli <raffalli@univ-savoie.fr>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] Question about polymorphic variant
Date: Tue, 22 Oct 2002 17:55:06 +0200 [thread overview]
Message-ID: <3DB574DA.5080908@univ-savoie.fr> (raw)
In-Reply-To: <200210221507.g9MF7b517633@concorde.inria.fr>
After reading the manual, I am a bit confused ...
I should say this part of the manual could be clearer ?
In the following code, f and g typecheck but not h.
Why ?
let f = function
`a -> 0
| `b -> 1
let g = function
`c -> 2
| (`a | `b as x) -> f x
let h = function
`c -> 2
| x -> f x
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-10-22 20:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 15:07 [Caml-list] does ocaml have a wxWindows classes wraper climb
2002-10-22 15:55 ` Christophe Raffalli [this message]
2002-10-23 0:17 ` [Caml-list] Question about polymorphic variant Jacques Garrigue
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=3DB574DA.5080908@univ-savoie.fr \
--to=raffalli@univ-savoie.fr \
--cc=caml-list@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