Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006155OCamlOCaml typingpublic2013-09-04 03:332013-09-04 08:33
Reporterdrup 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version4.01.0+beta/+rc 
Target VersionFixed in Version 
Summary0006155: object type ad type equalities in .mli
DescriptionThe following syntax is not accepted in .mli files :

type t1 = t2 = < a : string >

It's accepted for anything else than an object type.

This seems to be already the case in 4.00.1.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010305)
gasche (developer)
2013-09-04 08:33
edited on: 2013-09-04 08:34

This feature is documented in the manual ( http://caml.inria.fr/pub/docs/manual-ocaml/manual016.html [^] ) as the combination of both a "type equation", adding an equality with an already-defined type expression, and a "type definition", introducing a new datatype (or generative type, if you wish), that is a sum type or a record, or re-exporting an existing datatype, for the purpose of introducing the datatype constructors/fields in the current scope as well.

Your example fails just as well with other already-defined type expressions, such as (int) or [ `A | `B ]. It wouldn't be much useful as (int), `A or #foo are already in scope anyway. I don't think any change is required.


- Issue History
Date Modified Username Field Change
2013-09-04 03:33 drup New Issue
2013-09-04 08:33 gasche Note Added: 0010305
2013-09-04 08:33 gasche Status new => resolved
2013-09-04 08:33 gasche Resolution open => no change required
2013-09-04 08:33 gasche Assigned To => gasche
2013-09-04 08:34 gasche Note Edited: 0010305 View Revisions
2013-09-04 08:34 gasche Note Edited: 0010305 View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker