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: 1593 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
The subject line I gave for the bug is misleading, since the following
code gets essentially the same error and has no typedef and no type
"any":
module type Unintern_strategy = sig
val unintern_eventdesc: ([>`ANY] as 'a) -> 'a list
end
module Intern_strategy_tweaked : Unintern_strategy =
struct
let unintern_eventdesc : ([>`ANY] as 'a) -> 'a list = failwith "ouch"
end
--
Tim Freeman tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered:
The subject line I gave for the bug is misleading, since the following
code gets essentially the same error and has no typedef and no type
"any":
module type Unintern_strategy = sig
val unintern_eventdesc: ([>`ANY] as 'a) -> 'a list
end
module Intern_strategy_tweaked : Unintern_strategy =
struct
let unintern_eventdesc : ([>`ANY] as 'a) -> 'a list = failwith "ouch"
end
Indeed, this is just another example of misgivings with the value
restriction: failwith "ouch" is a function application, so
unintern_eventdesc cannot be given a polymorphic type.
I suppose you wanted to write:
let unintern_eventdesc : ([>`ANY] as 'a) -> 'a list =
fun _ -> failwith "ouch"
That one should type properly.
Original bug ID: 1593
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
The subject line I gave for the bug is misleading, since the following
code gets essentially the same error and has no typedef and no type
"any":
module type Unintern_strategy = sig
val unintern_eventdesc: ([>`ANY] as 'a) -> 'a list
end
module Intern_strategy_tweaked : Unintern_strategy =
struct
let unintern_eventdesc : ([>`ANY] as 'a) -> 'a list = failwith "ouch"
end
--
Tim Freeman tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered: