help with recognizing symbolic identifiers

Richard Eisenberg eir at cis.upenn.edu
Sat Jun 27 14:36:05 UTC 2015


Hi devs,

I've just posted #10583 (http://ghc.haskell.org/trac/ghc/ticket/10583) about fixing up basicTypes/Lexeme.hs. As stated in the ticket, I'm happy to do the hacking, but I need some advice. My most pressing question is this:

Examine the following functions, which all should do the same thing
  * isVarSymChar: https://github.com/ghc/ghc/blob/master/compiler/basicTypes/Lexeme.hs#L102
  * okSymChar: https://github.com/ghc/ghc/blob/master/compiler/basicTypes/Lexeme.hs#L215
  * notFollowedBySymbol: https://github.com/ghc/ghc/blob/master/compiler/parser/Lexer.x#L904

These functions intend to identify characters that can appear in symbolic identifiers. They all have different implementations. Which one is right? Or is there a better way to do this operation?

There are other questions in the ticket, but I can probably sort those out on my own. If you can help, ideally you will respond in the ticket itself.

Many thanks!
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150627/d10a234b/attachment.html>


More information about the ghc-devs mailing list