caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolás Ojeda Bär" <nicolas.ojeda.bar@lexifi.com>
To: Christophe Garion <tofgarion@runbox.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Printer for lists in toplevel is different when opening List
Date: Wed, 26 Feb 2020 15:51:19 +0000	[thread overview]
Message-ID: <CADK7aFO9vWgjdQnf8kUVhn0CU-KZ4aD7wseGQrMNb7y_-aRNUA@mail.gmail.com> (raw)
In-Reply-To: <877e09fjs7.fsf@port-garion.isae.fr>

Dear Christophe,

Looks like a bug in the toplevel printer to me (and it is still
present in 4.10).
Could you please open a bug report at

    https://github.com/ocaml/ocaml/issues

with the description of the issue as in your message? Thanks!

Best wishes,
--
Nicolás OJEDA BÄR
nicolas.ojeda.bar@lexifi.com
https://www.lexifi.com

Le mer. 26 févr. 2020 à 16:30, Christophe Garion
<tofgarion@runbox.com> a écrit :
>
> Hello,
>
> I am using OCaml 4.09.0 from OPAM and I have just noticed something
> peculiar using the toplevel.
>
> When evaluating 1 :: 2 :: [], the list is printed as usual:
>
> # 1 :: 2 :: 3 :: [] ;;
> - : int list = [1; 2; 3]
>
> If I open first List, then the printing is different:
>
> # open List ;;
> # 1 :: 2 :: 3 :: [] ;;
> - : int List.t = (::) (1, [2; 3])
>
> The list is now typed with the type t used in the List module signature
> and the list representation is different. It seems that the "classic"
> printing function is used for the tail of the list, but not for the
> first Cons of the list.
>
> Is it normal?
>
> Best regards,
>
> Christophe
>
> --
> Christophe Garion
> GPG: 1982 15B2 64AC 3C34 532D  BF19 6CD6 246C 62DA 5A7F

  reply	other threads:[~2020-02-26 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 15:30 Christophe Garion
2020-02-26 15:51 ` Nicolás Ojeda Bär [this message]
2020-02-26 20:55   ` Christophe Garion
2020-02-26 18:36 ` Florian Angeletti
2020-02-26 21:00   ` Christophe Garion

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=CADK7aFO9vWgjdQnf8kUVhn0CU-KZ4aD7wseGQrMNb7y_-aRNUA@mail.gmail.com \
    --to=nicolas.ojeda.bar@lexifi.com \
    --cc=caml-list@inria.fr \
    --cc=tofgarion@runbox.com \
    /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).