On Jan 9, 2008 3:10 PM, Ralf Laemmel <[EMAIL PROTECTED]> wrote:
>
> Type-level type cast is the type-level programmer's swiss army knife.
> See the illustration below.
>
Does this get any easier with type families? Your (TypeCast a b) seems
similar in intent to (a ~ b), but I'm not familiar enou
Thank you very much, Ralf, for your very thorough reply. That's a very
general way to deal with the issue. It never occurred to me that the
"inspected" class itself might carry the availability info.
Cheers,
Jorge.
Ralf Laemmel escreveu:
>> Given two type classes A t and B t, I'd like the typec
> Given two type classes A t and B t, I'd like the typechecker to derive
> different A t instances depending exactly on whether t is an instance of
> B. In other words, is it possible to define a class (actually a type-level
> function) IsB t f such that:
A GHC-like type system is in principle pow
On 1/9/08, Jorge Marques Pelizzoni <[EMAIL PROTECTED]> wrote:
> Given two type classes A t and B t, I'd like the typechecker to derive
> different A t instances depending exactly on whether t is an instance of
> B.
I think this would require some kind of whole-program analysis. While
Haskell provi