Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Order in type definitions, output_value on abstract values
@ 1997-07-22  8:01 Pascal Brisset
  0 siblings, 0 replies; only message in thread
From: Pascal Brisset @ 1997-07-22  8:01 UTC (permalink / raw)
  To: caml-list


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 






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-07-22 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-22  8:01 Order in type definitions, output_value on abstract values Pascal Brisset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox