Hi,
This can be done using the "when" keyword - it works with both " 'a c " and " c<'a> " syntaxes, so you can use which one you prefer:

1
2
3
4
5
6
7
8
9
10
11
12
13
 

type 'a c when 'a :> data = class  
  val d : 'a  
  new (init) = { d = init } 
end;;

type c<'a when 'a :> data> = class  
  val d : 'a  
  new (init) = { d = init } 
end;;

By on 12/17/2007 6:34 AM ()

Thank you.
I tried with the "when" keyword, but did not come up with the right syntax.

Best,
Keiko

By on 12/17/2007 7:13 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper