I am trying to compile a lex.x with ghc 7.10.2 and alex 3.1.4, but it is giving the below error. I checked Lex.hs and indeed there is no applicative instance for 'Alex' there.
Note: This error started coming after I moved from wrapper 'monad' to 'monad-bytestring'
templates/wrappers.hs:287:10:
No instance for (Applicative Alex)
arising from the superclasses of an instance declaration
In the instance declaration for ‘Monad Alex’
I saw that in alex 3.1.4 this was fixed http://hackage.haskell.org/package/alex
Changes in 3.1.4:
Add Applicative/Functor instances for GHC 7.10
Below commit introduced the applicative instance, but it is not present in my generated Lex.hs. Can I manually use the below wrapper to be used for generating Lex.hs?
https://github.com/simonmar/alex/commit/b1472bfbb7b95bcd6c66558197e2603997d9ce0b