Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Pascal Brisset <brisset@recherche.enac.fr>
To: caml-list@inria.fr
Subject: Order in type definitions, output_value on abstract values
Date: Tue, 22 Jul 1997 10:01:35 +0200	[thread overview]
Message-ID: <199707220801.KAA04834@indigo.recherche.enac.fr> (raw)


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 






                 reply	other threads:[~1997-07-22 16:27 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=199707220801.KAA04834@indigo.recherche.enac.fr \
    --to=brisset@recherche.enac.fr \
    --cc=caml-list@inria.fr \
    /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