Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- data Source m loc input = Source {
- sourceSkip :: (Elem input -> Bool) -> m ()
- sourceTry :: forall a. m (Maybe a) -> m (Maybe a)
- sourcePull :: (Elem input -> Bool) -> m (Maybe (loc, Elem input))
- sourcePulls :: forall s. Maybe Int -> (Int -> Elem input -> s -> Maybe s) -> s -> m (Maybe (loc, input))
- sourceBumpLoc :: Elem input -> loc -> loc
- sourceRemaining :: m (loc, input)
- data Location = Location !Int !Int
- class Sequence is where
- type Elem is
- makeListSourceIO :: forall i loc. Eq i => loc -> (i -> loc -> loc) -> [i] -> IO (Source IO loc [i])
Documentation
data Source m loc input Source #
An abstract source of input tokens that we want to perform lexical analysis on.
Each token is associated with a source location loc
.
A a sequence of tokens has type input
, and a single token type (Elem
input).
Source | |
|
A location in a source file.