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

Multiple 'module type of' are incompatible #5164

Closed
vicuna opened this issue Oct 6, 2010 · 1 comment
Closed

Multiple 'module type of' are incompatible #5164

vicuna opened this issue Oct 6, 2010 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 6, 2010

Original bug ID: 5164
Reporter: sebmondet
Status: closed (set by @garrigue on 2010-10-07T02:24:37Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.0
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #4487

Bug description

Trying to compile this:

module type INCLUDING = sig
include module type of List
include module type of ListLabels
end

module Including_typed: INCLUDING = struct
include List
include ListLabels
end

gives the error:
File "tt.ml", line 7, characters 36-82:
Error: Signature mismatch:
Modules do not match:
sig
val length : 'a list -> int
(* ... the whole ListLabels signature ... *)
end
is not included in
INCLUDING
Values do not match:
val iter : f:('a -> unit) -> 'a list -> unit
is not included in
val iter : ('a -> unit) -> 'a list -> unit

with:
$ ocamlc -version
3.12.0

(compiled from GODI)

@vicuna
Copy link
Author

vicuna commented Oct 7, 2010

Comment author: @garrigue

Well spotted.
There was a very stupid bug in 3.12, where only the first repeated definition
was discarded when including signatures, but other repetitions were kept.

This is fixed in revision 10706, file typemod.ml.

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