[Haskell-cafe] Re: is there a way to pretty print a module?
bertram.felgenhauer at googlemail.com
Thu Oct 30 17:39:52 EDT 2008
Jason Dagit wrote:
> Could you use haskell-src from TH and then unsafePerformIO to get the
> reading to work during compile time? I've done something like this in
> the past with Language.Haskell and TH. I described it here:
> Maybe someone who has studied more TH knows a way to remove the unsafePerformIO.
tests :: [String]
tests = unsafePerformIO $
tests :: Q [String]
tests = runIO $
$(mkChecks =<< tests)
(The Q monad should really have an MonadIO instance.)
More information about the Haskell-Cafe