[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Ryan Tarpine <rtarpine@h...> |
| Subject: | Re: [Caml-list] Allowing many types |
>polymorphic variant me be the answer, because you can get back the
>type :
>...
I'm probably missing something obvious, but how do you store a polymorphic
variant in a field in a record? Before, when I just used a normal variant
type I called "primitive", all I did was
type my_object = { object_data : primitive; (* etc. *) }
Is there a type that means "any polymorphic variant"? Trying to set
type primitive = [ `PTest ]
forces only `PTest to be the value of object_data. How can I allow anything
to be stored there?
Thanks,
Ryan Tarpine, rtarpine@hotmail.com
"To err is human, to compute divine. Trust your computer but not its
programmer."
- Morris Kingston
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr