Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Another q about many types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ryan Tarpine <rtarpine@h...>
Subject: [Caml-list] Another q about many types
Many thanks for the advice on polymorphic variants; they seemed to be just 
what I needed.  But I've run into one small problem:  I can't define 
exceptions with arguments of polymorphic types.

In the language I'm trying to implement, to raise an exception, the user 
needs to create an instance of an exception class.  So, in my 
implementation, I wanted to define an exception whose sole argument would be 
an instance of a class.  But, I designed instances to be records containing 
a polymorphic variant, which makes the record type itself polymorphic.  Is 
there some way to raise exceptions with polymorphic arguments, or some other 
possible way of implementing this?

Thanks in advance,

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