Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005622OCamlOCaml typingpublic2012-05-24 19:522012-05-24 21:16
Reporterhongboz 
Assigned Toprotz 
PriorityhighSeveritycrashReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005622: typing error : The implementation does not match the interface
DescriptionI 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 Reproduceocamlc -c type_error_ppo.ml
TagsNo tags attached.
Attached Files? file icon type_error_ppo.ml [^] (1,324 bytes) 2012-05-24 19:52 [Show Content]

- Relationships

-  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
Powered by Mantis Bugtracker