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: 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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: