Fix startsVarSym and refactor operator predicates (fixes #4239)

Authored by MaloJaffre on Aug 27 2016, 12:29 PM.



startsVarSym used isSymbol which does not recognize valid operators
beginning with OtherPunctuation generalCategory (e. g. (·)).
Move it to ghc-boot-th for reducing duplication.

This patch fixes template-haskell pretty printer, which is used by

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
MaloJaffre updated this revision to Diff 8491.Aug 27 2016, 12:29 PM
MaloJaffre retitled this revision from to Fix startsVarSym and refactor operator predicates (fixes #4239).
MaloJaffre updated this object.
MaloJaffre edited the test plan for this revision. (Show Details)
MaloJaffre updated the Trac tickets for this revision.
MaloJaffre updated this revision to Diff 8493.Aug 27 2016, 12:45 PM
MaloJaffre edited edge metadata.
MaloJaffre removed rGHC Glasgow Haskell Compiler as the repository for this revision.
thomie set the repository for this revision to rGHC Glasgow Haskell Compiler.Aug 28 2016, 5:42 PM
bgamari edited edge metadata.Aug 31 2016, 2:33 PM

Thanks @MaloJaffre.


Thanks for killing this one. However, I am a bit concerned that this set doesn't match the set used by okSymChar. Have you verified that okSymChar is correct?

MaloJaffre marked an inline comment as done.Sep 1 2016, 8:15 AM
MaloJaffre added inline comments.

All these ASCII characters are also matched by okSymChar, so they are equivalent for ASCII input.

bgamari accepted this revision.Sep 1 2016, 10:12 AM
bgamari edited edge metadata.

Thanks @MaloJaffre!


Alright, works for me.

This revision is now accepted and ready to land.Sep 1 2016, 10:12 AM
This revision was automatically updated to reflect the committed changes.

I'm very sorry @MaloJaffre, it looks like Phabricator gave me authorship over your patch. I've reverted and pushed a new commit with proper attribution.