Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More for bug 1592 #8062

Closed
vicuna opened this issue Mar 14, 2003 · 1 comment
Closed

More for bug 1592 #8062

vicuna opened this issue Mar 14, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 14, 2003

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

@vicuna vicuna closed this as completed Mar 15, 2003
@vicuna
Copy link
Author

vicuna commented Mar 15, 2003

Comment author: administrator

From: tim@fungible.com

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.

 Jacques

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant