
ChrisK wrote:
-- You need to help GHC more here: type instance A_T () =
type instance A_T (Var x) = type instance A_T [t] = t type instance A_T (RHS (Var x) a) = type instance A_T (RHS [t] a) = t
Chris, this actually isn't workable. The problem is that there is no such thing as "explicit type you actually ue with ()". If the type variable 'a' gets matched to () or (Var x), then t can be any type. That works currently. I don't want to fix the type of 't', as this code goes in a library where different applications are using different types for 't'. As I said, this is probably not really right, since () really doesn't determine a value for a; but it does work right now. Just for kicks, I tried this: type instance A_T () = forall t. t it didn't work. -- Chris Smith