[GHC] #9784: Improve error message for misplaced quote inside promoted qualified type

GHC ghc-devs at haskell.org
Wed Nov 12 12:27:13 UTC 2014


#9784: Improve error message for misplaced quote inside promoted qualified type
-------------------------------------+-------------------------------------
              Reporter:  crockeea    |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:
  (Parser)                           |     Architecture:  Unknown/Multiple
            Resolution:              |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:  #3155
       Type of failure:  GHC         |
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Good idea, but not so clear how to implement it.  Your text tokenises as
 {{{
 bar :: Rpoxy Foo . 'Z -> Int
 }}}
 and the parse error happens on the "." before the parse has even seen the
 `'Z`.

 I suppose the lexer could see `Foo.'Z` and warn that it looks suspicious.
 Or even lex it as if you had written `'Foo.Z`?

 Simon

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


More information about the ghc-tickets mailing list