Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005728OCamlOCaml generalpublic2012-08-16 09:102012-11-06 13:41
Reporterfuruse 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version4.00.0 
Target VersionFixed in Version 
Summary0005728: Better handling of unary tuple type
DescriptionPlaying with compiler-libs, I found that it is now rather easy to create an unary tuple value Parsetree node and it is typable with a strange unary tuple type.

Of course it is the user's responsibility not to create such strange AST nodes, but I think the compiler can provide some help by explicitly rejecting the typing of unary tuples.

BTW, the type error message related with this unary tuple type looks very cryptic:

  Error: This expression has type 'a but an expression was expected of type
           string

Here 'a is not a simple Tvar but something to be printed like Tuple('a), which is not unifiable with string.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005811resolvedfrisch Untypeast produces singleton tuples for constructor patterns with only one argument 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-08-16 09:10 furuse New Issue
2012-09-06 16:43 doligez Target Version => 4.00.1+dev
2012-09-28 09:50 doligez Severity minor => feature
2012-09-28 09:50 doligez Status new => acknowledged
2012-09-28 09:50 doligez Target Version 4.00.1+dev =>
2012-11-06 13:41 gasche Relationship added related to 0005811


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker