We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b6dc17 commit e16be32Copy full SHA for e16be32
src/Text/Parsing/Parser.purs.hs
@@ -42,6 +42,13 @@ type Parser s a = ParserT s Identity a
42
runParser :: forall s a. s -> Parser s a -> Either ParseError a
43
runParser s = runIdentity <<< runParserT s
44
45
+instance functorParserT :: (Monad m) => Functor (ParserT s m) where
46
+ (<$>) = liftA1
47
+
48
+instance applicativeParserT :: (Monad m) => Applicative (ParserT s m) where
49
+ pure = return
50
+ (<*>) = ap
51
52
instance monadParserT :: (Monad m) => Monad (ParserT s m) where
53
return a = ParserT (return a)
54
(>>=) p f = ParserT (unParserT p >>= (unParserT <<< f))
0 commit comments