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 (Range loc, Elem input))
- sourcePulls :: forall s. Maybe Int -> (Int -> Elem input -> s -> Maybe s) -> s -> m (Maybe (Range loc, input))
- sourceBumpLoc :: Elem input -> loc -> loc
- sourceRemaining :: m (loc, input)
- data Range loc = Range !loc !loc
- data Location = Location !Int !Int
- class Sequence is where
- 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 range of locations in a source file.
Range !loc !loc |
A location in a source file.