On Mon, Feb 13, 2012 at 6:07 AM, Bas van Dijk <v.dijk.bas@gmail.com> wrote:
Edward,
it was my impression that you have to use ScopedTypeVariables or other
tricks to work with Proxy to.
But with Tagged the situation is similar:
{-# LANGUAGE ScopedTypeVariables #-}
typeOf :: forall a. Typeable a => a -> TypeRep
typeOf _ = unTagged (typeRep :: Tagged a TypeRep)
or without extensions:
typeOf :: Typeable a => a -> TypeRep
typeOf x = unTagged (t x)
where
t :: Typeable b => b -> Tagged b TypeRep
t _ = typeRep
Where is the "huge pain" you are talking about?