[
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: | Christian Stork <cstork@i...> |
| Subject: | UsingPolymorphic Variants |
Basic Question:
Why aren't polymorphic variants coerced by default?
My Situation:
I am automatically generating some code that uses polymorphic variants
extensively. The inferred types are very complicated. Unfortunatly, at
some points in my code coercions are needed for it to compile. Since I
don't have the types available when I generate the code (and I don't
think it's possible to refer to inferred types in coercions) I can't
coerce explicitly. I'd like to be able to say something like:
... f (x: type_of_x :> type_expected_by_f) ...
Anyway, that's why I'm wondering why the compiler doesn't automatically
coerce or, at least, offer a switch with this functionality.
Thanks for your time,
Chris
--
Chris Stork <> Support eff.org! <> http://www.ics.uci.edu/~cstork/
OpenPGP fingerprint: B08B 602C C806 C492 D069 021E 41F3 8C8D 50F9 CA2F