[GHC] #10056: Inconsistent precedence of ~

GHC ghc-devs at haskell.org
Sun Dec 6 04:21:31 UTC 2015


#10056: Inconsistent precedence of ~
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.4
  (Parser)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10059            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I'm not aware of anyone disagreeing, so I don't think that's an obstacle.

 I attempted to fix this at one point, but I wasn't experienced enough in
 GHC to come up with a solution. One huge obstacle (for me, anyway) is that
 GHC co-opts the tilde symbol for
 [http://git.haskell.org/ghc.git/blob/1e041b7382b6aa329e4ad9625439f811e0f27232:/compiler/parser/Parser.y#l1779
 laziness annotations], which means that all occurrences of `~` as type
 equalities are converted via a
 [http://git.haskell.org/ghc.git/blob/5f1e42f22cf29bc1b7150e06b2711fa7c43c6e5b:/compiler/parser/RdrHsSyn.hs#l1066
 special parser function]. This makes it much harder to remove `~` as a
 special parser case, and when I tried removing it, it ended up introducing
 an enormous number of shift-reduce conflicts.

 I would also like to see this fixed at some point, but I don't think I'm
 going to be the one to fix it.

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


More information about the ghc-tickets mailing list