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: 5632 Reporter:@mmottl Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2015-12-11T18:04:51Z) Resolution: fixed Priority: normal Severity: minor Fixed in version: 4.00.0+dev Category: typing Monitored by:@mmottl
Bug description
# ocamlopt -version
4.01.0+dev3_2012-05-30
Case 1:
foo.mli:
module M : sig type t end with type t := int
# ocamlopt -w A foo.mli
File "foo.mli", line 1, characters 20-21:
Warning 34: unused type t.
Case 2 (related?):
foo.mli (surprisingly no warnings, unlike .ml below!):
module type S = sig type t end
module M : S with type t := int
foo.ml:
module type S = sig type t end
module M = struct type t = int end
# ocamlopt -w A -c foo.mli
# ocamlopt -w A -c foo.ml
File "foo.ml", line 2, characters 23-30:
Warning 34: unused type t.
The text was updated successfully, but these errors were encountered:
About case 2: the type declaration in .ml is indeed useless, since the expected signature is the empty one. You can remove it and the code will compile fine. Do you agree?
About case 1: I agree that with constraints (= or :=) should count as references to the corresponding type. I'll see if this can be fixed easily.
Yeah, right, the := operator really doesn't say anything about a "t" in the module. It just requires a "t" in the signature - and removes it. Case 2 seems ok.
Original bug ID: 5632
Reporter: @mmottl
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:04:51Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.00.0+dev
Category: typing
Monitored by: @mmottl
Bug description
Case 1:
foo.mli:
Case 2 (related?):
foo.mli (surprisingly no warnings, unlike .ml below!):
foo.ml:
The text was updated successfully, but these errors were encountered: