Question regarding template Haskell

Yu Di diyu60607 at yahoo.com
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=
  do
     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?

Thanks!

Di, Yu
9.11

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the Libraries mailing list