A year ago I made a
program. I took code from ApplicativeParsec.hs (capt. 16 Real
World Haskell).
The program
compiled and ran flawless. Now (after a year) I've upgraded to GHC version
7.0.4 (Windows) and I want to change something. But the unchanged
version doesn't compile any more. I get warning:
ApplicativeParsec.hs:17:10:
Illegal instance declaration for `Applicative (GenParser s
a)'
(All instance types must be of the form (T
t1 ... tn)
where T is not a
synonym.
Use -XTypeSynonymInstances if
you want to disable this.)
In the instance declaration for
`Applicative (GenParser s a)'
ApplicativeParsec.hs:22:10:
Illegal instance declaration for `Alternative ....(same advice
as above)
So I added
TypeSynonymInstances. Then I got:
ApplicativeParsec.hs:22:10:
Overlapping instances for Applicative (GenParser s
a)
arising from the superclasses of an
instance declaration
Matching
instances:
instance Applicative
(Text.Parsec.Prim.ParsecT s u m)
-- Defined in Text.Parsec.Prim
instance
Applicative (GenParser s a)
--
Defined at ApplicativeParsec.hs:17:10-36
In the instance
declaration for `Alternative (GenParser s a)'
Then I added the
OverlappingInstances directive. Same error and no
compilation.
I wonder, is this
the new GHC version? And what can I do about it?
Kees