@@ -31,7 +31,7 @@ module Streamly.Internal.Data.Parser.ParserK.Types
3131 )
3232where
3333
34−import Control.Applicative (Alternative(..))
34+import Control.Applicative (Alternative(..), liftA2)
3535import Control.Exception (assert, Exception(..))
3636import Control.Monad (MonadPlus(..), ap)
3737import Control.Monad.Catch (MonadCatch, MonadThrow(..), try)
@@ -319,6 +319,11 @@ instance Monad m => Applicative (Parser m a) where
319319 yield1 s (Error e) = yieldk s (Error e)
320320 in runParser m1 lo st yield1
321321
322+#if MIN_VERSION_base(4,10,0)
323+ {-# INLINE liftA2 #-}
324+ liftA2 f x = (<*>) (fmap f x)
325+#endif
326+
322327-------------------------------------------------------------------------------
323328-- Monad
324329-------------------------------------------------------------------------------