reify: how to show the result.
"Rene de Visser" <[email protected]> Tue, 19 Jul 2005 19:08:05 +0200
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <[email protected]> |
I guess this is easy, but I am not managing it.
I have
data SmallDB = SmallDB { rel1 :: Set.Set String
, rel2 :: Set.Set Integer } deriving Show
and wish to see the results of reify 'SmallDB
which I need to evaluate this at compile time.
test212 data_con = do; (DataConI _ typ _ _) <- runQ (reify data_con); print
typ
test214 data_con = do; string <- runIO $ test212 data_con; return string
Which I now need to splice in
test213 = $(test214 'SmallDB)
so that I can run test213 to see the result.
How do I write test214 so that it has the correct result type?
What does report do? Can I use it to print out the result?
Why does the Info type not support the type class show?
Rene.