Version française
Home     About     Download     Resources     Contact us    
Browse thread
storing object in record
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael <micha-1@f...>
Subject: Re: [Caml-list] storing object in record
Am Wednesday 08 April 2009 09:54:48 schrieben Sie:

> There is no value of type: forall 'a. #baseclass as 'a.

is this similar? :

 type 'a xx = 'a constraint 'a = < asBase: baseObject; .. > ;;

(why does: type 'a xx = < asBase: baseObject; ..>  as 'a  not work instead? )


 type 'a r = { state: 'a xx };;

gives:
type 'a r = { state : 'a xx; } constraint 'a = < asBase : baseObject; .. >


so the record holds objects with an asBase method and more, isn't this the 
same as #baseObject?


 Michael