From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: Strange syntax error
Date: Sun, 23 Jan 2005 21:11:12 +0000 [thread overview]
Message-ID: <20050123211112.GA14067@furbychan.cocan.org> (raw)
The following compiles fine:
type t = { keyword : string; cost : float option; }
let f =
function
| { keyword = keyword } when keyword.[0] = '-' -> keyword
| { keyword = keyword; cost = None } -> keyword
| _ -> failwith "whatever"
But this, which surely is equivalent, fails with a syntax error at the
second '|' character:
type t = { keyword : string; cost : float option; }
let f =
function
| { keyword = keyword } when keyword.[0] = '-' (* -> keyword *)
| { keyword = keyword; cost = None } -> keyword
| _ -> failwith "whatever"
OCaml 3.08.1.
Is this a parsing bug?
Rich.
--
next reply other threads:[~2005-01-23 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-23 21:11 Richard Jones [this message]
2005-01-23 21:44 ` [Caml-list] " Nicolas Cannasse
2005-01-23 21:49 ` Jon Harrop
2005-01-23 22:23 ` Kurt Welgehausen
2005-01-23 23:12 ` Richard Jones
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=20050123211112.GA14067@furbychan.cocan.org \
--to=rich@annexia.org \
--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