
Adding an annotation should not change the parse tree in any way other
#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 int-index): Replying to [comment:5 osa1]: 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.
I'm not assuming this. In the patch that I offered, it is still parsed as `{-# SCC foo #-} f x y`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15730#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler