I'd like to create a Template Haskell function such that:
$(isInstanceOf ''Read ''SomeType)
will result in either True
if SomeType
is an instance of Read
, and False
otherwise.
I tried to look at the result of reify
and I think I'm looking for the contents of the ClassI
constructor, but the documentation is somewhat lacking and I'm having trouble deciphering what I need. Can someone provide guidance on where to look to find the data needed to create the above function?