RE: accessing compilation parameters from template haskell

2011-09-16 Thread Simon Peyton-Jones
The difficulty here is that the TH library, by design, doesn't depend on GHC. So we can't have a TH function getFlags :: Q DynFlags or (as you suggest, more or less) runTc :: TcM a - Q a because to write those type signatures in Language.Haskell.TH.Syntax you'd need to import

Re: accessing compilation parameters from template haskell

2011-09-16 Thread Ganesh Sittampalam
Would making a template-haskell-ghc package make sense? Might be overkill just for my requirement but there could be other things like support for GHC-specific language extensions that might also logically belong there. On 16/09/2011 08:21, Simon Peyton-Jones wrote: The difficulty here is that

RE: accessing compilation parameters from template haskell

2011-09-16 Thread Simon Peyton-Jones
| Would making a template-haskell-ghc package make sense? Might be | overkill just for my requirement but there could be other things like | support for GHC-specific language extensions that might also logically | belong there. I don't know -- I don't know what it would look like. By all means