Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data Scanner m loc input a = Scanner {
- runScanner :: Source m loc input -> m (Maybe a)
- scanSourceToList :: Monad m => Source m loc [i] -> Scanner m loc [i] a -> m ([a], loc, [i])
Documentation
data Scanner m loc input a Source #
Scanner of input tokens that produces a result value
of type a
when successful.
Scanner | |
|
Instances
Monad m => Monad (Scanner m loc input) Source # | |
Monad m => Functor (Scanner m loc input) Source # | |
Monad m => Applicative (Scanner m loc input) Source # | |
Defined in Text.Lexer.Inchworm.Scanner pure :: a -> Scanner m loc input a # (<*>) :: Scanner m loc input (a -> b) -> Scanner m loc input a -> Scanner m loc input b # liftA2 :: (a -> b -> c) -> Scanner m loc input a -> Scanner m loc input b -> Scanner m loc input c # (*>) :: Scanner m loc input a -> Scanner m loc input b -> Scanner m loc input b # (<*) :: Scanner m loc input a -> Scanner m loc input b -> Scanner m loc input a # |