utop icon indicating copy to clipboard operation
utop copied to clipboard

printing constructor crashes unexpectedly

Open nrolland opened this issue 3 years ago • 1 comments

I experience a crash in utop not present in ocaml repl when #use-ing this file and printing constructors. This seems like a bug.

(*UtopBug.ml*)
module MyModule = struct
  type z = Z
end
utop # #show MyModule.Z;;
>> Fatal error: Ident.rename MyModule.z
Fatal error: exception Misc.Fatal_error

❯ 

in ocaml's repl it gives

# #show MyModule.Z;;
type MyModule.z = Z
#

additional information

❯ utop -version
The universal toplevel for OCaml, version 2.7.0, compiled for OCaml version 4.12.0
❯ opam --version
2.0.8
❯ ocaml --version
The OCaml toplevel, version 4.12.0

nrolland avatar Apr 23 '21 09:04 nrolland

I have avoided a similar bug in the upstream toplevel, I will have a look at least by the time of the 4.13 release.

Octachron avatar Jun 04 '21 12:06 Octachron