Closed markwright closed 11 years ago
Apart from this problem, the Monoid instance is not consistent with the Semigroup one. Here's a patch for both issues:
diff --git a/src/Text/Trifecta/Parser.hs b/src/Text/Trifecta/Parser.hs index 28386ca..0ed5033 100644 --- a/src/Text/Trifecta/Parser.hs +++ b/src/Text/Trifecta/Parser.hs @@ -92,11 +92,11 @@ instance Alternative Parser where {-# INLINE many #-} some p = (:) <$> p <*> Alternative.many p
-instance Semigroup (Parser a) where
-instance Monoid (Parser a) where +instance Monoid a => Monoid (Parser a) where mappend = liftA2 mappend {-# INLINE mappend #-} mempty = pure mempty
I'll ship out a patch today.
Stopped on my way into work and camped out on a bench to fix it. You should be all set. =)
trifecta-1.1 builds fine with ghc 7.6.3 on Gentoo amd64. I had loosened the the blaze-html and fingetree deps. Bumping it to 1.2, I also loosened the deps so I could compile it. For me, the compile fails, so just wanted to report that, thanks.