From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19369 for caml-redistribution; Tue, 22 Jul 1997 18:27:24 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA10322 for ; Tue, 22 Jul 1997 10:01:38 +0200 (MET DST) Received: from indigo.recherche.enac.fr (root@indigo.recherche.enac.fr [195.220.158.66]) by nez-perce.inria.fr (8.8.5/8.7.3) with ESMTP id KAA01675 for ; Tue, 22 Jul 1997 10:01:37 +0200 (MET DST) Received: from cyan.recherche.enac.fr (cyan.recherche.enac.fr [195.220.158.73]) by indigo.recherche.enac.fr (8.8.6/8.6.11) with SMTP id KAA04834 for ; Tue, 22 Jul 1997 10:01:36 +0200 Message-Id: <199707220801.KAA04834@indigo.recherche.enac.fr> Received: by cyan.recherche.enac.fr (1.38.193.4/16.2) id AA02312; Tue, 22 Jul 1997 10:01:35 +0200 Date: Tue, 22 Jul 1997 10:01:35 +0200 From: Pascal Brisset To: caml-list@inria.fr Subject: Order in type definitions, output_value on abstract values Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: weis Two non related questions about Ocaml 1.05, one about type signatures and one about a low-level implementation detail: - Why the order of labels and constructors in type definition is relevant ? # module M : sig type t = A | B end = struct type t = B | A end;; Signature mismatch: ... # module M : sig type t = {a : int; b : int} end = struct type t = {b : int; a : int} end;; Signature mismatch: ... - Why is it not possible to output_value an abstract value if it is atomic ? # output_value stdout (Hashtbl.create 1);; ¦¾ C@- : unit = () # output_value stdout stdout;; Uncaught exception: Invalid_argument("output_value: abstract value") --Pascal Brisset