[GHC] #1444: Template Haskell: add proper support for qualified names in non-splicing applications

GHC trac at galois.com
Thu Jun 21 09:45:30 EDT 2007


#1444: Template Haskell: add proper support for qualified names in non-splicing
applications
---------------------------------+------------------------------------------
    Reporter:  SamB              |        Owner:         
        Type:  feature request   |       Status:  new    
    Priority:  normal            |    Milestone:         
   Component:  Template Haskell  |      Version:  6.6.1  
    Severity:  normal            |   Resolution:         
    Keywords:                    |   Difficulty:  Unknown
          Os:  Unknown           |     Testcase:         
Architecture:  Unknown           |  
---------------------------------+------------------------------------------
Comment (by simonpj):

 But what if the prelude is not imported? Or what you are referring to
 something not imported by the Prelude?

 I think what you want is a way to refer to the '''original nane''' of
 something.  Something like
 {{{
   module Foo where
     foo :: {-# ORIGINAL #-} Data.Array.Base.UArray
     foo = ...
 }}}
 Notice no imports!  The binding of the TyCon is completely fixed.

 This is what TH does internally.   See the `Name` data type in TH.   You
 are trying to still make it possible, but in the form of Haskell source
 code.

 Actually it's mainly a lexical/parsing problem. If you can decide on a
 lexical syntax for these original names, and persuade GHC to parse them,
 all subsequent phases know about original names, so it'd probably just
 work. See
 [http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/RdrNameType]
 (look at the `Orig` constructor for `RdrName`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1444>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list