[GHC] #1577: Give TH the ability to get the info for a class name

GHC trac at galois.com
Thu Aug 2 06:24:49 EDT 2007


#1577: Give TH the ability to get the info for a class name
----------------------------------+-----------------------------------------
    Reporter:  iampure at gmail.com  |        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 iampure at gmail.com):

 In the following code with Foo a class name(i.e. class Foo x y zwhere...)
 that is is imported from another module:

 {{{a = $(do info <-  reify (Name (mkOccName "Foo") NameS)
          () <- trace (show info) (return ())
          (liftM (LitE . StringL) currentModule))}}}

 The problem is that whatever I try, I don't get an info value. I basically
 guessed the NameS constructor, since I don't know what the "S" stands for.

 So, the problem is getting access to the Info value. I am either reifying
 the wrong thing or this feature simply does not work.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1577>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list