You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3546 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 resubmit the bug (seems it was lost last week!)
I have a strange behavior which seems related to the fact that I use a functor
application in which a record definition is made, then a module alias to this
application.
The OCaml compiler does not known that the obj in Obj' is equal to the type obj
in module Obj!!
ANd the bug dissapear if I replace the definition of type attr by the definition
which is put in comment below.
Here is the example :
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
The text was updated successfully, but these errors were encountered:
see also #3539. This boils down to the fact that F(M).t and F(M').t are
different types even though M' is defined as module M' = M. There is no
structure equality in type paths. Unnatural, but unlikely to be ever addressed.
XL, 2007-07-29.
Original bug ID: 3546
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 resubmit the bug (seems it was lost last week!)
I have a strange behavior which seems related to the fact that I use a functor
application in which a record definition is made, then a module alias to this
application.
The OCaml compiler does not known that the obj in Obj' is equal to the type obj
in module Obj!!
ANd the bug dissapear if I replace the definition of type attr by the definition
which is put in comment below.
Here is the example :
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
The text was updated successfully, but these errors were encountered: