[GHC] #10018: Cannot define custom fixity for infix data constructors in GHCi

GHC ghc-devs at haskell.org
Thu Jul 2 18:04:26 UTC 2015


#10018: Cannot define custom fixity for infix data constructors in GHCi
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  GHCi              |                 Version:  7.10.1-rc2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |               Test Case:
      Blocked By:                    |  ghci/scripts/T10018
 Related Tickets:  #9830, #2947,     |                Blocking:
  #4929                              |  Differential Revisions:  Phab:D1028
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Replying to [comment:5 thomie]:
 > I'm not sure why it partially worked when you added `deriving Show` in
 comment:2, but I have a patch up for review in Phab:D1028 that enables
 custom fixity declarations for infix data constructors.

 I'm guessing that the fixity info that derived `Read`/`Show` instances see
 must be distinct from the fixity info that's used when parenthesizing
 expressions (I'm not a GHC developer, this is just my speculation). I
 added #9830 since it addresses a similar issue, so maybe there's a clue in
 simonpj's fix for it.

 In any case, it looks like your patch will fix this discrepancy, so all is
 good.

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


More information about the ghc-tickets mailing list