this question has answer here:
i created data of template haskell. use program $(code here).
so, can convert data .hs file? want see structure of data.
one common way write normal haskell code uses template haskell , feed ghc option -ddump-splices
, -ddump-to-file
have output file containing of original code template haskell expanded can see being compiled.
another option if want not see full file use pretty printer comes template-haskell package. the module contains number of helper functions constructing doc
may rendered string pprint :: doc -> string
, outputted using io features of q
monad.
Comments
Post a Comment