#5239: Em-dash for "--" with UnicodeSyntax.
-----------------------------------------+----------------------------------
    Reporter:  Eelis-                    |        Owner:              
        Type:  feature request           |       Status:  patch       
    Priority:  normal                    |    Milestone:  7.4.1       
   Component:  Compiler (Parser)         |      Version:  7.0.3       
    Keywords:  unicode syntax extension  |     Testcase:              
   Blockedby:                            |   Difficulty:              
          Os:  Unknown/Multiple          |     Blocking:              
Architecture:  Unknown/Multiple          |      Failure:  None/Unknown
-----------------------------------------+----------------------------------
Changes (by porges):

  * status:  new => patch


Comment:

 I have added a tentative patch. It works fine, but if UnicodeSyntax is
 disabled then the lexer gives an error upon encountering the mdashes...
 unexpected character '\n' or something. I thought that this was because of
 the 'Unicode fix' which transforms mdash into \x7, but Alex always
 complains about \n, not whatever it gets transformed into.

 I'm not sure how to fix that, so I'm attaching it here in the hopes that
 someone else knows.

 I also added some extra checking to the 'not in scope' error (in
 RnEnv.lhs) that suggests that users might want to enable UnicodeSyntax if
 compilation fails because an mdash isn't in scope. A further extension
 would be for this to happen when any UnicodeSyntax character turns up
 here. (This can't be seen at the moment because of the aforementioned
 issue but works fine if only this part is enabled.)

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to