From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by margaux.inria.fr, Mon, 10 May 93 09:15:28 +0200 Received: from localhost.inria.fr by margaux.inria.fr, Sat, 8 May 93 18:35:48 +0200 To: caml-list@margaux Subject: Bug report: Caml-Light 0.5 Return-Receipt-To: murthy@margaux Date: Sat, 08 May 93 18:35:46 N Message-Id: <7369.736878946@margaux.inria.fr> From: murthy@margaux Sender: weis@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 = mkB : bool -> foo = #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 = B : int -> int = #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 #