Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005722OCamlOCaml generalpublic2012-08-07 14:512012-08-14 07:25
Reporterygrek 
Assigned Togarrigue 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.00.0 
Target VersionFixed in Version4.01.0+dev 
Summary0005722: toplevel: do not print full module path for record fields except the first one
DescriptionConsider :
module X = struct type t = { a : int; b : int; c : Complex.t; } end;;

Currently:
# { X.a = 1; b = 2; c = Complex.one; };;
- : X.t = {X.a = 1; X.b = 2; X.c = {Complex.re = 1.; Complex.im = 0.}}

With the patch :
# { X.a = 1; b = 2; c = Complex.one; };;
- : X.t = {X.a = 1; b = 2; c = {Complex.re = 1.; im = 0.}}
Additional InformationThe reason for this simple patch is to improve readability especially for deeply nested modules
TagsNo tags attached.
Attached Filesdiff file icon oval_record.diff [^] (589 bytes) 2012-08-07 14:51 [Show Content]

- Relationships

-  Notes
(0007941)
garrigue (manager)
2012-08-14 03:06

This is perfectly reasonable, as record parsing allows qualifying only one of the labels.
And the patch is wonderfully short.
I plan to apply it immediately to trunk.
Shall we use it in 4.00 too ?
The only side-effect I foresee may be some change in test outputs.
(0007942)
hcarty (reporter)
2012-08-14 03:20

As a frequent toplevel user, I would love to see this patch in 4.00.x.
(0007943)
garrigue (manager)
2012-08-14 07:25

Implemented the requested behavior in genprintval.ml rather than oprint.ml.
Committed in trunk revision 12861, waiting for 4.00.

- Issue History
Date Modified Username Field Change
2012-08-07 14:51 ygrek New Issue
2012-08-07 14:51 ygrek File Added: oval_record.diff
2012-08-14 03:03 garrigue Assigned To => garrigue
2012-08-14 03:03 garrigue Status new => assigned
2012-08-14 03:06 garrigue Note Added: 0007941
2012-08-14 03:20 hcarty Note Added: 0007942
2012-08-14 07:25 garrigue Note Added: 0007943
2012-08-14 07:25 garrigue Status assigned => resolved
2012-08-14 07:25 garrigue Fixed in Version => 4.01.0+dev
2012-08-14 07:25 garrigue Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker