[GHC] #8488: Annotations should not distinguish type and value

GHC ghc-devs at haskell.org
Mon Apr 28 10:44:47 UTC 2014


#8488: Annotations should not distinguish type and value
-------------------------------------+------------------------------------
        Reporter:  simonpj           |            Owner:  errge
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by simonpj):

 I'm not sure it's a mistake for TH to just use `String`. TH is meant to be
 close to Haskell source.  And it might impact a lot of people to change
 this.

 I'm more open to adding `hasOccName` to `OutputableBndr`.  But it seems
 like a sledgehammer to crack a nut.  Unless there are other uses for it,
 it might be tidier to change `AnndDecl` thus:
 {{{
 data AnnDecl Name = HsAnnotation Name NameSpace (Located (HsExpr name))
 }}}
 with the invariant that the `NameSpace` should match that of the `Name`.
 That would remove a tiresome additional type, perhaps clarify the intent.

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8488#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list