Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005449OCamlOCaml generalpublic2011-12-23 17:132011-12-28 03:24
Reporterpilki 
Assigned Togarrigue 
PrioritynoneSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.13.0+dev 
Summary0005449: In GADT's, _ type variables are replaced with 'a, 'b, etc
DescriptionWhen you define the gadt:
<<<
type 'int eq_int = EqInt : int eq_int
>>>
ocamlc -i produces the correct interface
<<<
type 'int eq_int = EqInt : int eq_int
>>>

But if you define
<<<
type (_, _) eq = Eq: ('a, 'a) eq
>>>
you obtain
<<<
type ('a, 'b) eq = Eq : ('a, 'a) eq
>>>
where the _s have been replaced by type variables. The _ should be kept
TagsNo tags attached.
Attached Files

- Relationships
child of 0005444closedgarrigue A parent "feature request" for a serie of FR about printing type variables 

-  Notes
(0006529)
garrigue (manager)
2011-12-24 02:31

I see the point.
Having new variables appear in type definitions may be confusing.
However "_" is not a real variable name, so this requires some thinking.
Maybe we could have just a special behavior only for type definitions,
as one cannot add a constraint to an unnamed type parameter inside the
definition.
(0006543)
garrigue (manager)
2011-12-28 03:24

Fixed in Printtyp and Oprint, revision 11964.

- Issue History
Date Modified Username Field Change
2011-12-23 17:13 pilki New Issue
2011-12-23 17:16 protz Relationship added child of 0005444
2011-12-24 02:27 garrigue Assigned To => garrigue
2011-12-24 02:27 garrigue Status new => assigned
2011-12-24 02:31 garrigue Note Added: 0006529
2011-12-24 02:31 garrigue Status assigned => acknowledged
2011-12-28 03:24 garrigue Note Added: 0006543
2011-12-28 03:24 garrigue Status acknowledged => closed
2011-12-28 03:24 garrigue Resolution open => fixed
2011-12-28 03:24 garrigue Fixed in Version => 3.13.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker