| Anonymous | Login | Signup for a new account | 2013-05-21 23:54 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 | |||||||
| 0005622 | OCaml | OCaml typing | public | 2012-05-24 19:52 | 2012-05-24 21:16 | |||||||
| Reporter | hongboz | |||||||||||
| Assigned To | protz | |||||||||||
| Priority | high | Severity | crash | Reproducibility | always | |||||||
| Status | resolved | Resolution | no change required | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005622: typing error : The implementation does not match the interface | |||||||||||
| Description | I attached the file(ocaml 3.12.1) I have a deadline next week, I would appreicate if anyone could give me some hints. (maybe I am wrong, the type system of Object layer is nontrivial to me) | |||||||||||
| Steps To Reproduce | ocamlc -c type_error_ppo.ml | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0007459) protz (manager) 2012-05-24 20:49 |
I'm not getting any type error running this on a recent trunk build. Maybe you could copy/paste the error message? |
|
(0007460) protz (manager) 2012-05-24 20:50 |
Also, the bug tracker is for problems with ocaml itself. If you need help, I suggest posting a question on Stack Overflow which has an excellent OCaml community, or to the caml-list as a last resort. Thanks, jonathan |
|
(0007461) hongboz (developer) 2012-05-24 21:16 |
The error message is attached File "type_error_ppo.ml", line 1, characters 0-1: Error: The implementation type_error_ppo.ml does not match the interface (inferred signature): Modules do not match: sig class map : object ('a) method float : float -> float method int : int -> int method m_list : ('a -> 'b -> 'c) -> 'b m_list -> 'c m_list method string : string -> string method tree : ('a -> 'd -> 'e) -> 'd tree -> 'e tree method twice : ('a -> 'f -> 'g) -> 'f twice -> 'g twice method unknown : 'h -> 'h end end is not included in sig class map : object ('a) method float : float -> float method int : int -> int method m_list : ('a -> 'b -> 'c) -> 'b m_list -> 'c m_list method string : string -> string method tree : ('a -> 'd -> 'e) -> 'd tree -> 'e tree method twice : ('a -> 'f -> 'g) -> 'f twice -> 'g twice method unknown : 'h -> 'h end end Class declarations do not match: class map : object ('a) method float : float -> float method int : int -> int method m_list : ('a -> 'b -> 'c) -> 'b m_list -> 'c m_list method string : string -> string method tree : ('a -> 'd -> 'e) -> 'd tree -> 'e tree method twice : ('a -> 'f -> 'g) -> 'f twice -> 'g twice method unknown : 'h -> 'h end does not match class map : object ('a) method float : float -> float method int : int -> int method m_list : ('a -> 'b -> 'c) -> 'b m_list -> 'c m_list method string : string -> string method tree : ('a -> 'd -> 'e) -> 'd tree -> 'e tree method twice : ('a -> 'f -> 'g) -> 'f twice -> 'g twice method unknown : 'h -> 'h end The method twice has type 'a 'b. ((< float : float -> float; int : int -> int; m_list : 'e 'f. ('d -> 'e -> 'f) -> 'e m_list -> 'f m_list; string : string -> string; tree : 'g 'h. ('d -> 'g -> 'h) -> 'g tree -> 'h tree; twice : 'a 'b. 'c; unknown : 'i. 'i -> 'i; .. > as 'd) -> 'a -> 'b) -> 'a twice -> 'b twice as 'c but is expected to have type 'j 'k. ('d -> 'j -> 'k) -> 'j twice -> 'k twice Type 'a twice = 'a is not compatible with type 'j twice = 'j |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-24 19:52 | hongboz | New Issue | |
| 2012-05-24 19:52 | hongboz | File Added: type_error_ppo.ml | |
| 2012-05-24 20:49 | protz | Note Added: 0007459 | |
| 2012-05-24 20:50 | protz | Note Added: 0007460 | |
| 2012-05-24 20:51 | protz | Status | new => resolved |
| 2012-05-24 20:51 | protz | Resolution | open => no change required |
| 2012-05-24 20:51 | protz | Assigned To | => protz |
| 2012-05-24 21:16 | hongboz | Note Added: 0007461 | |
| Copyright © 2000 - 2011 MantisBT Group |