Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- count :: (Foldable t, Monad m, OwoifyError e) => Int -> t (InnerWord -> m InnerWord) -> OwoifyParser e [m InnerWord]
- data OError
- = EOF
- | ParseError Text
- class OwoifyError e
- data OwoifyParser e a
- runParser :: OwoifyError e => OwoifyParser e a -> [Text] -> Either e (OwoifyResult a)
Documentation
count :: (Foldable t, Monad m, OwoifyError e) => Int -> t (InnerWord -> m InnerWord) -> OwoifyParser e [m InnerWord] Source #
Replicate owoify parser according to the specified length (n
) and a collection of owoify functions.
A simple type representing errors that occur during owoification.
class OwoifyError e Source #
Represents those types denoting errors when owoifying.
eof, parseError
Instances
OwoifyError OError Source # | |
Defined in Data.Owoify.Internal.Parser.OwoifyParser parseError :: Text -> OError |
data OwoifyParser e a Source #
Instances
Applicative (OwoifyParser e) Source # | |
Defined in Data.Owoify.Internal.Parser.OwoifyParser pure :: a -> OwoifyParser e a # (<*>) :: OwoifyParser e (a -> b) -> OwoifyParser e a -> OwoifyParser e b # liftA2 :: (a -> b -> c) -> OwoifyParser e a -> OwoifyParser e b -> OwoifyParser e c # (*>) :: OwoifyParser e a -> OwoifyParser e b -> OwoifyParser e b # (<*) :: OwoifyParser e a -> OwoifyParser e b -> OwoifyParser e a # | |
Functor (OwoifyParser e) Source # | |
Defined in Data.Owoify.Internal.Parser.OwoifyParser fmap :: (a -> b) -> OwoifyParser e a -> OwoifyParser e b # (<$) :: a -> OwoifyParser e b -> OwoifyParser e a # | |
Monad (OwoifyParser e) Source # | |
Defined in Data.Owoify.Internal.Parser.OwoifyParser (>>=) :: OwoifyParser e a -> (a -> OwoifyParser e b) -> OwoifyParser e b # (>>) :: OwoifyParser e a -> OwoifyParser e b -> OwoifyParser e b # return :: a -> OwoifyParser e a # |
runParser :: OwoifyError e => OwoifyParser e a -> [Text] -> Either e (OwoifyResult a) Source #
Executes (unwraps) the parser inside the monad.