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

Revert "Add a proper implementation of fail to the Alex monad" #142

Closed josephcsible closed 5 years ago

josephcsible commented 5 years ago

The GHC version detection didn't actually work right, resulting in the __GLASGOW_HASKELL__ < 800 branch always being taken. This became apparent once I tried using GHC 8.8, as the fallback of fail inside Monad is no longer there, so it fails to compile. We need to fix this by playing the same sort of double-#define games that GenericTemplate.hs does. I plan to do that in a later PR but would like to unbreak this for now. Since there's been no release of Alex since this was added, this shouldn't qualify as a breaking change.

Reverts simonmar/alex#136