haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
297 stars 82 forks source link

Use unsafeShiftR in utf8Encode #129

Open sjakobi opened 5 years ago

sjakobi commented 5 years ago

That could be a tiny bit faster than the current use of shiftR.

Since unsafeShiftR has been in base since v4.5 / GHC-7.4, could it even be used unconditionally?! alex currently claims a rather dubious lower bound on base of >= 1.0

andreasabel commented 4 years ago

It is not entirely clear to me which GHC versions Alex wants to support. The currently lowest version tested on travis is 7.0.4. (See ae56173317700b117cd50b97176178a70e75af95.)

simonmar commented 4 years ago

Let's keep support for 7.0.4 while it still works. If it becomes hard to support/test older versions we can increase the lower bound in the future.

andreasabel commented 2 years ago

NB: The current (3.2.7) lower bound on base is >= 2.1. GHC-7.0 is 4.3.