Solved, thanks for your help Simon.
I was assuming that dataConRepType would return a core type, i.e. with
the predicates translated to actual dictionaries. With that assumption
out of the way, everything fits in its place.
pepe
On 28/08/2008, at 15:50, Simon Peyton-Jones wrote:
> class E
> class Eq a => Eq2 a where eq :: a -> a -> Bool
Based on the runtime representation above, I expect the type of Main.:DEq2 to be
Main.:DEq2 :: GHC.Base.:TEq a -> (a -> a -> Bool) -> Main.:TEq2 a
but GHC tells me, via (fmap dataConRepType . tcLookupDatacon), the following
Main.:DEq2 :: (a ->
On 26/08/2008, at 13:30, Simon Peyton-Jones wrote:
| E.g., the type below is generated for :DNum, the datacon of a Num
| dictionary.
| At least, this is what :print obtains from a tcLookupDatacon
on :DNum.
|
| :DNum ::(a -> a -> a)
| -> (a -> a -> a)
|
| E.g., the type below is generated for :DNum, the datacon of a Num
| dictionary.
| At least, this is what :print obtains from a tcLookupDatacon on :DNum.
|
| :DNum ::(a -> a -> a)
| -> (a -> a -> a)
| -> (a -> a -> a)
|