query functions

Abraham Egnor <[email protected]>
Newsgroups gmane.comp.lang.haskell.template
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.