Hi Frederik,
[resending; as it bounced because of size.]
That’s a tricky one.
Let’s first recall that this one is still fine:
*Main> :t cast True :: (Typeable a, Typeable b) => Maybe (a,b)
cast True :: (Typeable a, Typeable b) => Maybe (a,b) :: (Typeable b,
Hi Ralf,
Thanks. I'm sorry, now I think that wasn't the source of my problem.
What I want to do is specialise not to a specific type like Bool but
to the class of all pairs (a,b). But this causes the compiler to
complain, even for simpler examples:
cast True :: (Typeable a, Typeable b) => Maybe
> Hi Ralf,
>
> I'm looking for a function like extT but with more general type:
>
> (t a -> s a) -> (t b -> s b) -> (t a -> s a)
>
> Is there such a thing in the generics library?
Hi Frederik,
Not sure how you are exactly going to use such an operation ...
But here is its implementation anyhow