added explicit definitions for (<*) and (*>)
commitaef030952382bcfce8da5037ac929698243f3d4b
authorwren ng thornton <wren@community.haskell.org>
dateSun 10 Oct 2010, 22:09 (16 years ago)
parentd2ac8a7
Data/Attoparsec/Internal.hs+8−2
@@ -165,8 +165,14 @@ apP d e = do
165165{-# INLINE apP #-}
166166
167167instance Applicative Parser where
168− pure = returnP
169− (<*>) = apP
168+ pure = returnP
169+ (<*>) = apP
170+
171+ -- These definitions are equal to the defaults, but this
172+ -- way the optimizer doesn't have to work so hard to figure
173+ -- that out.
174+ (*>) = (>>)
175+ x <* y = x >>= \a -> y >> return a
170176
171177instance Alternative Parser where
172178 empty = failDesc "empty"