Question regarding template Haskell

Yu Di diyu60607 at
Thu Sep 11 20:32:41 EDT 2003

Hi, I have a question regarding template Haskell: from
the documentation, I have the impression that it is
impossible to reify the type of the variable passed to
the template function, is this true? Or, in other
words, can I write a function like:

getTupleCount :: a -> ExpQ

getTupleCount x=
     t <- (reifyType x)
     --work on t

which returns an expression that is an integer for any
tuple input, but reduces to error for any input that
is not a tuple?


Di, Yu

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

More information about the Libraries mailing list