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

"Unbound module type" within the signature of a recursive module. #4501

Closed
vicuna opened this issue Feb 10, 2008 · 1 comment
Closed

"Unbound module type" within the signature of a recursive module. #4501

vicuna opened this issue Feb 10, 2008 · 1 comment
Milestone

Comments

@vicuna
Copy link

vicuna commented Feb 10, 2008

Original bug ID: 4501
Reporter: jm
Status: closed (set by @damiendoligez on 2012-09-15T10:01:20Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Target version: 4.00.1+dev
Category: typing
Tags: recmod

Bug description

% ocaml
Objective Caml version 3.10.2+dev2 (2008-01-22)

(* This works: *)

module A

: sig module type S = sig type t end
      include S end
= struct module type S = sig type t end
         type t end;;

module A : sig module type S = sig type t end type t end
(* But this doesn't: *)

module rec B : sig module type S = sig type t end

                 include S end
= struct module type S = sig type t end
         type t end;;

Unbound module type S
(* However, something like that works: *)

module rec C : sig module type S = sig type t end

                 module type R = S
                 module Q : S end
= struct module type S = sig type t end
         module type R = S        
         module Q = struct type t end end;;

module rec C :
sig module type S = sig type t end module type R = S module Q : S end

The behaviour for B is quite strange, is it a bug?

@vicuna
Copy link
Author

vicuna commented Sep 15, 2012

Comment author: @damiendoligez

Not sure exactly when this was fixed, but all three are accepted in 4.00.0.

@vicuna vicuna closed this as completed Sep 15, 2012
@vicuna vicuna added the typing label Mar 14, 2019
@vicuna vicuna added this to the 4.00.1 milestone Mar 14, 2019
@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
Projects
None yet
Development

No branches or pull requests

1 participant