| Anonymous | Login | Signup for a new account | 2013-05-22 17:27 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005632 | OCaml | OCaml typing | public | 2012-06-01 20:12 | 2012-06-05 06:32 | |||||||
| Reporter | mottl | |||||||||||
| Assigned To | frisch | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | 4.00.0+dev | ||||||||||
| Summary | 0005632: Broken "unused type" cases in the developer tree with := type substitutions | |||||||||||
| 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. | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0007511) frisch (developer) 2012-06-04 11:52 |
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. |
|
(0007512) frisch (developer) 2012-06-04 12:02 |
Case 1 fixed in trunk (r12550) and 4.00 (r12549). |
|
(0007516) mottl (reporter) 2012-06-04 17:36 |
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. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-06-01 20:12 | mottl | New Issue | |
| 2012-06-02 10:20 | frisch | Assigned To | => frisch |
| 2012-06-02 10:20 | frisch | Status | new => assigned |
| 2012-06-04 11:52 | frisch | Note Added: 0007511 | |
| 2012-06-04 12:02 | frisch | Note Added: 0007512 | |
| 2012-06-04 17:36 | mottl | Note Added: 0007516 | |
| 2012-06-05 06:32 | frisch | Status | assigned => resolved |
| 2012-06-05 06:32 | frisch | Fixed in Version | => 4.00.0+dev |
| 2012-06-05 06:32 | frisch | Resolution | open => fixed |
| Copyright © 2000 - 2011 MantisBT Group |