the latest version of Happy gives the following error message with GHC 7.10.4
No instance for (Applicative HappyIdentity) arising from the superclasses of an instance declaration
I think I should nof mess up Happy, but how can I solve my problem?
the latest version of Happy gives the following error message with GHC 7.10.4
No instance for (Applicative HappyIdentity) arising from the superclasses of an instance declaration
I think I should nof mess up Happy, but how can I solve my problem?
Begining with GHC 7.10 the "Applicative Monad Proposal" has been implemented. This is a breaking change and the Happy library has not yet been updated to address this.
There is a migration guide in the haskell wiki, which addresses exactly this problem.
Basically since Applicative
and Functor
are now superclasses of Monad
you need to add instance declarations. In this case HappyIdentity
is an instance of Monad
so you need to add instances Applicative HappyIdentity
and Functor HappyIdentity
. In addition the Monad
instance can be removed since it is now redundant.
Without modifying the library yourself, the only option is to donwgrade to an earlier GHC release or wait until the library maintainer updates the library.