
19 Aug
2006
19 Aug
'06
3 a.m.
Hello Greg, Saturday, August 19, 2006, 3:42:45 AM, you wrote:
-- Is something like this possible? derive Show Val2
yes, in proposal :) well, the best practical way i know is to use Template Haskell / DrIFT. I can give your a TH module which generates Show instances. So, using it will as easy as import THShow .... $(deriveShow Val2) of course, TH is GHC-only solution. you can prefer DrIFT what is a general preprocessor and afair it contains a lot of prewritten instance-generation modules -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com