[GHC] #12884: Parsing of literate files fails because of special character (#)

GHC ghc-devs at haskell.org
Sun Nov 27 17:42:34 UTC 2016


#12884: Parsing of literate files fails because of special character (#)
-------------------------------------+-------------------------------------
           Reporter:  bales          |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
  (Parser)                           |
           Keywords:  literate       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  GHC rejects
  Unknown/Multiple                   |  valid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 A sharp sign (#) in the documentation part of a literate haskell file
 causes the parser to fail. As I understand it, any line that doesn't start
 with a greater-than sign should be ignored.

 {{{#!hs
 #+

 > module Empty where
 }}}

 The previous code leads to the following error:

 with ghc-7.8.3: Bug.lhs:1:2: lexical error at character '+'[[BR]]
 with ghc-8.0.1: Bug.lhs:1:1: error: parse error on input ‘#+’

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


More information about the ghc-tickets mailing list