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

bug in module alias #3775

Closed
vicuna opened this issue Aug 29, 2005 · 1 comment
Closed

bug in module alias #3775

vicuna opened this issue Aug 29, 2005 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 29, 2005

Original bug ID: 3775
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #5302

Bug description

Full_Name: Daniel Weil
Version: 3.08.3
OS: Win32
Submission from: 211.121.39-62.rev.gaoland.net (62.39.121.211)

This bug was previously submitted and considered as "not a bug".
I re-submit it with a simpler example :

module Make = functor (X: sig
type 'a t
end) ->
struct

type attr = Bidon
type obj = attr X.t
end

module Obj = struct
module M = struct
type 'a t = 'a
end
module X = Make (M)
end

module Obj' = Obj

let f = fun (x:Obj.X.obj)-> (x:Obj'.X.obj)

This program is refused because the signature of module "Obj" is

module Obj :
sig
module M : sig type 'a t = 'a end
module X : sig type attr = Make(M).attr = Bidon type obj = attr M.t end
end

I Think that the strenghening if module Obj.X is too strong, signature of module
Obj should just be (the alias to the functor application "= Make(M).attr" does
not look necessary)

module Obj :
sig
module M : sig type 'a t = 'a end
module X : sig type attr = Bidon type obj = attr M.t end
end

@vicuna
Copy link
Author

vicuna commented Oct 12, 2005

Comment author: administrator

This is still "not a bug", but a limitation of the OCaml module system
( F(X).t != F(X').t even if X = X' ) that will not go away any time soon.

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