Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005618OCaml~DO NOT USE (was: OCaml general)public2012-05-17 22:182015-12-11 19:04
Assigned Tofrisch 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.01.0+dev 
Summary0005618: enrich "not a function" compile error with type information
DescriptionWhen there's a type error, and in particular I'm trying to use a non-function as a function, I wish the error message would include the specific types involved instead of just saying "not a function".
Steps To Reproduce# let x = 3;;
val x : int = 3
# x [];;
Error: This expression has type int but an expression was expected of type
         'a -> 'b
# x 5;;
Error: This expression is not a function; it cannot be applied
Additional InformationI'd like "x 5" above to produce an error more like "This expression is not a function and so cannot be applied. In particular, it has type int but an expression was expected of type int -> 'a".

I mention this mostly because there's a chance it's very easy to implement.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
frisch (developer)
2012-05-28 13:55

Fixed in trunk (commit #12489).

- Issue History
Date Modified Username Field Change
2012-05-17 22:18 cfalls New Issue
2012-05-28 13:55 frisch Note Added: 0007467
2012-05-28 13:55 frisch Status new => resolved
2012-05-28 13:55 frisch Fixed in Version => 4.01.0+dev
2012-05-28 13:55 frisch Resolution open => fixed
2012-05-28 13:55 frisch Assigned To => frisch
2015-12-11 19:04 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker