Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006763OCamltools (ocaml{lex,yacc,dep,debug,...})public2015-01-29 15:062016-12-07 11:49
Reporterdsheets 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.02.1 
Target VersionFixed in Version4.02.2+dev / +rc1 
Summary0006763: Toplevel with -short-paths doesn't select shortest type paths
Description$ ocaml -short-paths
        OCaml version 4.02.1

# #show_module Hex;;
module Hex :
  sig
    val of_char : char -> char * char
    val to_char : char -> char -> char
    type t = [ `Hex of CamlinternalFormatBasics.char_set ]
    val of_string : ?pretty:bool -> CamlinternalFormatBasics.char_set -> t
    val to_string : t -> CamlinternalFormatBasics.char_set
  end

but when using ocamlc:

$ ocamlfind ocamlc -package hex -i test_sp.ml
val of_char : char -> char * char
val to_char : char -> char -> char
type t = [ `Hex of string ]
val of_string : ?pretty:bool -> string -> t
val to_string : t -> string

$ ocamlfind ocamlc -short-paths -package hex -i test_sp.ml
val of_char : char -> char * char
val to_char : char -> char -> char
type t = [ `Hex of bytes ]
val of_string : ?pretty:bool -> bytes -> t
val to_string : t -> bytes
Steps To ReproduceInstall 4.02.1 and use -short-paths with the toplevel.
Additional Informationutop 1.17 (latest) has -short-paths on by default.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0013193)
garrigue (manager)
2015-01-30 02:34

Could you explain what is wrong ?
For which type Is there a shorter path available ?
(0013194)
garrigue (manager)
2015-01-30 02:44

Note that if you are talking about the fact string is turned into bytes (which is certainly not longer), this just follows the specification of short-paths: choose the equivalent path with the smallest number of dots, and the most recent one if the length is identical. Since in the unsafe environment bytes is defined as if it were
  type bytes = string
this results in bytes being the most recent one.
(0013195)
garrigue (manager)
2015-01-30 03:06

Sorry, I misunderstood the problem.
This was about the show directive, which didn't set a printing environment for short-paths.

Fixed in trunk and 4.02 at revisions 15798 and 15799.

- Issue History
Date Modified Username Field Change
2015-01-29 15:06 dsheets New Issue
2015-01-30 02:34 garrigue Note Added: 0013193
2015-01-30 02:34 garrigue Assigned To => garrigue
2015-01-30 02:34 garrigue Status new => feedback
2015-01-30 02:44 garrigue Note Added: 0013194
2015-01-30 03:06 garrigue Note Added: 0013195
2015-01-30 03:06 garrigue Status feedback => resolved
2015-01-30 03:06 garrigue Fixed in Version => 4.02.2+dev / +rc1
2015-01-30 03:06 garrigue Resolution open => fixed
2016-12-07 11:49 xleroy Status resolved => closed
2016-12-07 16:37 doligez Category OCaml tools (ocaml{lex,yacc,dep,browser,debug}) => OCaml tools (ocaml{lex,yacc,dep,debug})
2017-02-23 16:45 doligez Category OCaml tools (ocaml{lex,yacc,dep,debug}) => tools (ocaml{lex,yacc,dep,debug,...})


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker