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

On v3.2.4, when using monad wrappers, haskell errors with a variable not in scope (`alexEOF`). #146

Closed german1608 closed 5 years ago

german1608 commented 5 years ago

Last week I was using the monadUserState wrapper and I found the following error when compiling the .hs file:

/path/to/my/project/templates/wrappers.hs:243:16: error:
    • Variable not in scope: alexEOF :: Alex AlexUserState
    • Perhaps you meant data constructor ‘AlexEOF’ (line 2015)

then I looked at the generated .hs file and I see that, in effect, the variable was not defined.

This stackoverflow answer states that the alexEOF should be defined, but that doesn't appear on the alex documentation.