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

ByteString wrappers: Use uncons instead of head/tail #89

Closed erikd closed 8 years ago

erikd commented 8 years ago

The ByteString wrappers were using paired calls to BS.head and BS.tail which can be replaced a single call to BS.uncons.

simonmar commented 8 years ago

I think it'll end up generating the same code, but OK.