haskell / alex

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

Make 'Alex' an instance of Applicative #43

Closed nikomi closed 10 years ago

nikomi commented 10 years ago

When compiling Alex lexers with GHC 7.8.2 the following message is emitted:

‘Alex’ is an instance of Monad but not Applicative - this will become an
error in GHC 7.10, under the Applicative-Monad Proposal.

Could you please make 'Alex' an instance of Applicative to remove this?

thx, nik

jgallag88 commented 10 years ago

It needs to be made and instance of Functor too, I think. This seems to be growing in importance with 7.10 on the horizon.

rwbarton commented 10 years ago

This is already fixed by #47.