[GHC] #15730: SCC/HPC/CORE annotation can change the meaning of an expression

GHC ghc-devs at haskell.org
Tue Oct 9 20:22:20 UTC 2018


#15730: SCC/HPC/CORE annotation can change the meaning of an expression
-------------------------------------+-------------------------------------
        Reporter:  int-index         |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  8.6.1
  (Parser)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D5218
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 > Adding an annotation should not change the parse tree in any way other
 than adding an annotation to a node

 You're assuming that in

 {{{
 {-# SCC foo #-} f x y
 }}}

 the node you're annotating is `f` and not `f x y`. I don't know why this
 is better or more reasonable than the current behavior.

 Either way, as said in the diff, you need a proposal for this as this is a
 breaking change of a user-facing behavior.

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


More information about the ghc-tickets mailing list