From: murthy@margaux
To: caml-list@margaux
Subject: Bug report: Caml-Light 0.5
Date: Sat, 08 May 93 18:35:46 N [thread overview]
Message-ID: <7369.736878946@margaux.inria.fr> (raw)
It seems to me that there should at least be some sort of error
message, saying that I cannot redefine constructors.
--chet--
------------------------------------------
vougeot:camllight
> Caml Light version 0.5
#type foo = A of int | B of bool;;
Type foo defined.
#let mkA x = A x
and mkB x = B x;;
mkA : int -> foo = <fun>
mkB : bool -> foo = <fun>
#let A 5 = 5 and B 5 = 5;;
> Toplevel input:
>let A 5 = 5 and B 5 = 5;;
> ^^^^^^^
> Warning: pattern matching is not exhaustive
> Toplevel input:
>let A 5 = 5 and B 5 = 5;;
> ^^^^^^^
> Warning: pattern matching is not exhaustive
A : int -> int = <fun>
B : int -> int = <fun>
#A 5;;
- : foo = A 5
#B true;;
- : foo = B true
#B 5;;
> Toplevel input:
>B 5;;
> ^
> Expression of type int
> cannot be used with type bool
#
reply other threads:[~1993-05-10 7:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7369.736878946@margaux.inria.fr \
--to=murthy@margaux \
--cc=caml-list@margaux \
/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;
as well as URLs for NNTP newsgroup(s).