Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] classes and module types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: POUS Damien <dpous@e...>
Subject: [Caml-list] classes and module types
Hi,

<<
class type m_t = object end
class type ['a] c_t = object constraint 'a = #m_t end

module type T = sig
  type t
  class c: [t] c_t
end;;
            Characters 125-126:
    class c: [t] c_t
              ^
The type parameter t does not meet its constraint: it should be
  #m_t as 'a = < .. >
>>

I don't understand why this signature is rejected :
I would say it's ok, since one cannot write a module with this signature
without having t meeting the constraint...

How can I workaround this ?

thanks,
damien


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners