caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Julien Signoles <Julien.Signoles@cea.fr>
To: caml list <caml-list@inria.fr>
Subject: [Fwd: Re: [Caml-list] Re: Improving OCaml's choice of type to display]
Date: Mon, 12 Oct 2009 10:58:06 +0200	[thread overview]
Message-ID: <4AD2EF9E.8060400@cea.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 29 bytes --]

Sorry, forgot the caml-list.

[-- Attachment #2: Re: [Caml-list] Re: Improving OCaml's choice of type to display.eml --]
[-- Type: message/rfc822, Size: 1882 bytes --]

From: Julien Signoles <Julien.Signoles@cea.fr>
To: Jun Furuse <jun.furuse@gmail.com>
Subject: Re: [Caml-list] Re: Improving OCaml's choice of type to display
Date: Mon, 12 Oct 2009 10:48:36 +0200
Message-ID: <4AD2ED64.8020408@cea.fr>

Jun Furuse a écrit :
> I have quickly wrote a small patch against 3.11.1 for this feature, to
> see what it would be like.
> 
> http://sites.google.com/a/furuse.info/jun/hacks/other-small-ocaml-patches
> 
> With this patch, path names are printed without opened modules in the
> context. 

Do not print included modules as well would be better. However, after a 
quick look in the source of the caml compiler, it seems to be really 
harder to implement that the "do not print opened" rule.

It also tries heuristic data type name simplification: if a
> variant/record data type is an alias of another data type whose name
> is shorter than the original, the printer uses the latter.

> # type long_name = int;;
> type long_name = int
> # (1 : t);;
> - : t = 1                     (* t is the shorter than its original type int *)
> # (1 : long_name);;
> - : int = 1                   (* int is shorter name for long_name. t
> is even shorter but not aliased unfortunatelly. *)

I definitevely prefer to have long_name instead of int here: long_name 
is the name that the user choses in this context. From my point of view, 
the compiler should always use the name choosen by the user whenever 
possible.

--
Julien


             reply	other threads:[~2009-10-12  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  8:58 Julien Signoles [this message]
2009-10-12  8:58 Julien Signoles

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=4AD2EF9E.8060400@cea.fr \
    --to=julien.signoles@cea.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;
as well as URLs for NNTP newsgroup(s).