Hi Bas.

I haven't thought about this for long, but ...

> data ProxyWrapper constraint =
>    forall a. constraint a => ProxyWrapper (Proxy a)

I'm assuming adding Typable a in ProxyWrapper is not an option for you?

So then what about:

class (c1 a, c2 a) => Ext c1 c2 a
instance (c1 a, c2 a) => Ext c1 c2 a

typeOfInnerProxy :: ProxyWrapper (Ext Typeable constraint) -> TypeRep
typeOfInnerProxy (ProxyWrapper p) = typeOfArg p

This will certainly require all sorts of undecidable instances :) But
does it work for you?

Cheers,
  Andres

-- 
Andres Löh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to