[GHC] #10188: prefix type-level cons can't be parsed

GHC ghc-devs at haskell.org
Tue Mar 31 14:29:36 UTC 2015


#10188: prefix type-level cons can't be parsed
-------------------------------------+-------------------------------------
        Reporter:  Kinokkory         |                   Owner:  Kinokkory
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.8.4
  (Parser)                           |                Keywords:
      Resolution:                    |            Architecture:
Operating System:  Unknown/Multiple  |  Unknown/Multiple
 Type of failure:  GHC rejects       |               Test Case:
  valid program                      |                Blocking:
      Blocked By:                    |  Differential Revisions:  Phab:D768
 Related Tickets:  #10189            |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Looking more closely at this, I think this was not a bug in the parser,
 but in the pretty-printer. The pretty-printer prints type-level `:::` as
 `(':::)`, but it should be `'(:::)`, which is what is parsed. Normal type-
 level cons is parsed the same way, with the tick outside the parentheses.
 (Which I think is confusing, but that ship has sailed.)

 On the other hand, it does seem draconian to '''require''' the tick for
 cons, when `:` has no possible other interpretation as a type-level
 constant. So, considering this as a feature request, I think it's a good
 one. Thanks for the patch!

 Did you end up submitting a separate bug report for the pretty-printer?
 That's still outstanding, I believe.

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


More information about the ghc-tickets mailing list