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

Object type gives error "Unbound type parameter .." #4817

Closed
vicuna opened this issue Jun 7, 2009 · 2 comments
Closed

Object type gives error "Unbound type parameter .." #4817

vicuna opened this issue Jun 7, 2009 · 2 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 7, 2009

Original bug ID: 4817
Reporter: @alainfrisch
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2011-05-29T10:14:11Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.1+rc1
Fixed in version: 3.11.1+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4481

Bug description

Since OCaml 3.11 (I think), a definition like:

type t = < m : 'a. (< .. > as 'a) -> unit >

is rejected with the following error:

Error: Unbound type parameter ..

@vicuna
Copy link
Author

vicuna commented Jun 7, 2009

Comment author: @alainfrisch

This might be related to #4458.

The following works fine:

type o = < m : 'a. 'a -> unit > constraint 'a = < .. >

Is it possible to adapt the type pretty-printer to avoid printing invalid
types like < m : 'a. (< .. > as 'a) -> unit > ? E.g.:

module X : sig type o = unit end = struct class type o = object method m : 'a. (< .. > as 'a) -> unit end end

produces

...

   Type declarations do not match:
     type o = < m : 'a. (< .. > as 'a) -> unit >
   is not included in
     type o = unit

@vicuna
Copy link
Author

vicuna commented Jun 8, 2009

Comment author: @garrigue

Fixed in CVS for 3.11.1.
The fix to #4481 was incorrect.
Rollback it in Typetexp, and fix it properly in Typedecl.

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

2 participants