Bug report: Caml-Light 0.5

murthy@margaux
Sat, 08 May 93 18:35:46 N

To: caml-list@margaux
Subject: Bug report: Caml-Light 0.5
Date: Sat, 08 May 93 18:35:46 N
Message-Id: <7369.736878946@margaux.inria.fr>
From: murthy@margaux

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
#