[GHC] #9628: Add Annotations to the AST to simplify source to source conversions

GHC ghc-devs at haskell.org
Tue Sep 23 20:39:27 UTC 2014


#9628: Add Annotations to the AST to simplify source to source conversions
-------------------------------------+-------------------------------------
              Reporter:  alanz       |            Owner:  alanz
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by alanz):

 Firstly, I agree that this is in fact two orthogonal things, but I think
 it is good to discuss them together because some potential solutions could
 couple them together.

 `Located` is something that I considered for the annotation parameter, but
 I am concerned that it is so baked in to everything else that if it
 changed it would cause other unforeseen problems.

 In order to use it in this way it would have to become a parameter to the
 AST too, effectively replacing all instances of `Located` with
 `GenLocated`.

 Reference:
 {{{
 data GenLocated l e = L l e
   deriving (Eq, Ord, Typeable, Data)

 type Located e = GenLocated SrcSpan e
 }}}

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


More information about the ghc-tickets mailing list