1 Mar 2007 10:46
phantom type thing question
micha <micha-1 <at> fantasymail.de>
2007-03-01 09:46:14 GMT
2007-03-01 09:46:14 GMT
I'm getting confused while trying to implement some subtyping hierachy with polymorphic variants. say I have the hierachy: symbol -> image -> xpmimage and types like that: type 'a sym;; make_symbol : params -> [`Symbol] sym;; make_image: params -> [`Image] sym;; or should it be: make_image: params -> [`Symbol | `Image] sym;; make_xpm; params -> [`Symbol | `Image | `Xpm ] sym;; so that some functions work only on some symbols: val get_image_width: [< `Image | `XpmImage] sym -> int;; I think I mix up the [< ..] and [> ... ] type constructs, allthough I thought I understood it(Continue reading)Michael _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Michael
_______________________________________________
Caml-list mailing list. Subscription management:
RSS Feed