diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2017-10-25 15:52:38 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-25 16:44:22 -0400 |
commit | 821adee12e89dbd0a52fde872b633e4e2e9051dc (patch) | |
tree | beef26068d86bc80b5942e45e3534c039e5b4e74 /docs/users_guide/using-optimisation.rst | |
parent | f7f270eb6ba616feda79d370336db7e66f9ab79c (diff) | |
download | haskell-821adee12e89dbd0a52fde872b633e4e2e9051dc.tar.gz |
Fix a bug in 'alexInputPrevChar'
The lexer hacks around unicode by squishing any character into a 'Word8'
and then storing the actual character in its state. This happens at
'alexGetByte'.
That is all and well, but we ought to be careful that the characters we
retrieve via 'alexInputPrevChar' also fit this convention.
In fact, #13986 exposes nicely what can go wrong: the regex in the left
context of the type application rule uses the '$idchar' character set
which relies on the unicode hack. However, a left context corresponds
to a call to 'alexInputPrevChar', and we end up passing full blown
unicode characters to '$idchar', despite it not being equipped to deal
with these.
Test Plan: Added a regression test case
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13986
Differential Revision: https://phabricator.haskell.org/D4105
Diffstat (limited to 'docs/users_guide/using-optimisation.rst')
0 files changed, 0 insertions, 0 deletions