13 Jul
2004
13 Jul
'04
3:58 a.m.
One bit of functionality I've recently found a need for is various query functions in TH, i.e. something like typeMatches :: Type -> Type -> Bool that tests if the second type is a valid specialization of the first one. The main need I've had for this is to test typeclass membership, but it would also be useful so that TH code can maintain a mapping of user-specified types to actions or suchlike. Any chance of something like this getting into a future TH revision? Abe