-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Possible regression following 9623 #9640
Copy link
Copy link
Closed
Description
The following compiles with 4.10 and 4.11+alpha2 but fails with ocaml/4.11
@gasche, it's likely related to your work on #9623
module type Packet_type = sig
type t
end
module type Unpacked_header = sig
module Packet_type : Packet_type
type t
val f : t -> Packet_type.t -> unit
end
module type Header = sig
module Packet_type : Packet_type
module Unpacked : Unpacked_header with module Packet_type := Packet_type
end
module type S = sig
module Packet_type : Packet_type
module Header : Header with module Packet_type = Packet_type
end
module type Iobuf_packet = sig
module Make (Header : Header) () :
S
with module Packet_type = Header.Packet_type
with module Header.Unpacked = Header.Unpacked
endFile "a.ml", lines 19-21, characters 4-49:
19 | ....S
20 | with module Packet_type = Header.Packet_type
21 | with module Header.Unpacked = Header.Unpacked
Error: In this `with' constraint, the new definition of Header.Unpacked
does not match its original definition in the constrained signature:
Modules do not match:
sig
type t = Header/2.Unpacked.t
val f : t -> Header/2.Packet_type.t -> unit
end
is not included in
sig type t val f : t -> Packet_type/2.t -> unit end
Values do not match:
val f : t -> Header/2.Packet_type.t -> unit
is not included in
val f : t -> Packet_type/2.t -> unit
File "a.ml", line 7, characters 2-36: Expected declaration
File "a.ml", line 7, characters 2-36: Actual declaration
File "a.ml", line 15, characters 2-62:
Definition of module Header/1
File "a.ml", line 18, characters 15-21:
Definition of module Header/2
File "a.ml", line 10, characters 2-34:
Definition of module Packet_type/1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels