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

typing bug in module alias #3539

Closed
vicuna opened this issue Mar 15, 2005 · 1 comment
Closed

typing bug in module alias #3539

vicuna opened this issue Mar 15, 2005 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 15, 2005

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

Bug description

Full_Name: Daniel Weil
Version: 3.08
OS: Windows
Submission from: 62.39.121.226 (62.39.121.226)

I have a strange typing error. It seems that in some cases, the OCaml compiler
do not recognize the equality of type through module aliases.
The error (or bug?) appear only when the type definition is a record.

Here is the example (change the definition of type "attr" to make the bug
disappear):

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

(* type attr = (string option) X.content*)
type attr = {a : (string option) X.content}
type obj = attr X.t
end

module Obj = struct
module M = struct
type 'a t = 'a
type 'a content = 'a list
end
module Mmodel = Make (M)
include Mmodel
end

module Bidule = struct
module Obj' = Obj
module Common :sig
val f : Obj'.obj -> Obj'.obj
end = struct
let f x = (x:Obj.obj)
end

end

@vicuna
Copy link
Author

vicuna commented Mar 17, 2005

Comment author: administrator

see also #3546

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