Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006155OCamltypingpublic2013-09-04 03:332015-12-11 19:24
Assigned Togasche 
StatusclosedResolutionno 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
gasche (developer)
2013-09-04 08:33
edited on: 2013-09-04 08:34

This feature is documented in the manual ( [^] ) 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
2015-12-11 19:24 xleroy Status resolved => closed
2017-02-23 16:45 doligez Category OCaml typing => typing

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker