caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* class type param constraint
@ 2009-04-09  8:42 Radzevich Belevich
  2009-04-09 10:10 ` [Caml-list] " Radzevich Belevich
  2009-04-09 10:13 ` Jacques Garrigue
  0 siblings, 2 replies; 4+ messages in thread
From: Radzevich Belevich @ 2009-04-09  8:42 UTC (permalink / raw)
  To: Caml List

class [ 'c ] a = 
  object(self)                  
    constraint 'c = < .. >
    method as_c =  (self :> 'c)
    method id = Oo.id self
  end          ;;
class ['a] a :
  object ('a)
    constraint 'a = < as_c : 'a; id : int; .. >
    method as_c : 'a
    method id : int
  end
================

Why type 'c must have methods "as_c" and "id" ? 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-09 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-09  8:42 class type param constraint Radzevich Belevich
2009-04-09 10:10 ` [Caml-list] " Radzevich Belevich
2009-04-09 10:13 ` Jacques Garrigue
2009-04-09 10:21   ` Radzevich Belevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).