#1444: Template Haskell: add proper support for qualified names in non-splicing
applications
---------------------------------+------------------------------------------
Reporter: SamB | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.10
Component: Template Haskell | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
---------------------------------+------------------------------------------
Changes (by igloo):
* milestone: => 6.10
Comment:
Here's a simpler example which I think still has all the important bits:
{{{
$ (echo import qualified System.IO; ghc -fth -e 'Language.Haskell.TH.runQ
[d| main = putStr "Foo" >> return () |] >>= (print .
Language.Haskell.TH.ppr)')
import qualified System.IO
main = System.IO.putStr "Foo" GHC.Base.>> GHC.Base.return GHC.Base.()
}}}
So basically you want pprinting TH to generate portable code.
In general this is impossible as TH can dig out names that aren't
exported.
Apart from that, something like a "canonical" name could work. A nicer
alternative might be a way to ask, in the Q monad, which modules (either
giving it a list of module Name's, or using the modules that the current
module imports) export a given name.
This is quite close to #1480, actually.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1444>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs