You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5618 Reporter: cfalls Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2015-12-11T18:04:43Z) Resolution: fixed Priority: low Severity: feature Fixed in version: 4.01.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
When 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
List.map 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 information
I'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.
The text was updated successfully, but these errors were encountered:
Original bug ID: 5618
Reporter: cfalls
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:04:43Z)
Resolution: fixed
Priority: low
Severity: feature
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
When 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
List.map 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 information
I'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.
The text was updated successfully, but these errors were encountered: