| Copyright | (c) Paolo Martini 2007 |
|---|---|
| License | BSD-style (see the LICENSE file) |
| Maintainer | [email protected] |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Parsec compatibility module
module Text.ParserCombinators.Parsec.Prim
module Text.ParserCombinators.Parsec.Combinator
module Text.ParserCombinators.Parsec.Char
data ParseError Source
The abstract data type ParseError represents parse errors. It provides the source position (SourcePos) of the error and a list of error messages (Message). A ParseError can be returned by the function parse. ParseError is an instance of the Show and Eq classes.
| Exception ParseError Source | Since: parsec-3.1.17.0 |
Defined in Text.Parsec.Error MethodstoException :: ParseError -> SomeException fromException :: SomeException -> Maybe ParseError displayException :: ParseError -> String backtraceDesired :: ParseError -> Bool | |
| Show ParseError Source | |
Defined in Text.Parsec.Error MethodsshowsPrec :: Int -> ParseError -> ShowS show :: ParseError -> String showList :: [ParseError] -> ShowS | |
| Eq ParseError Source | |
Defined in Text.Parsec.Error | |
errorPos :: ParseError -> SourcePos Source
Extracts the source position from the parse error
The abstract data type SourcePos represents source positions. It contains the name of the source (i.e. file name), a line number and a column number. SourcePos is an instance of the Show, Eq and Ord class.
| Data SourcePos Source | |
Defined in Text.Parsec.Pos Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourcePos -> c SourcePos gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourcePos toConstr :: SourcePos -> Constr dataTypeOf :: SourcePos -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourcePos) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourcePos) gmapT :: (forall b. Data b => b -> b) -> SourcePos -> SourcePos gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r gmapQ :: (forall d. Data d => d -> u) -> SourcePos -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> SourcePos -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos | |
| Show SourcePos Source | |
| Eq SourcePos Source | |
| Ord SourcePos Source | |
Defined in Text.Parsec.Pos | |
type SourceName = String Source
sourceName :: SourcePos -> SourceName Source
Extracts the name of the source from a source position.
sourceLine :: SourcePos -> Line Source
Extracts the line number from a source position.
sourceColumn :: SourcePos -> Column Source
Extracts the column number from a source position.
incSourceLine :: SourcePos -> Line -> SourcePos Source
Increments the line number of a source position.
incSourceColumn :: SourcePos -> Column -> SourcePos Source
Increments the column number of a source position.
setSourceLine :: SourcePos -> Line -> SourcePos Source
Set the line number of a source position.
setSourceColumn :: SourcePos -> Column -> SourcePos Source
Set the column number of a source position.
setSourceName :: SourcePos -> SourceName -> SourcePos Source
Set the name of the source.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.12.1/docs/libraries/parsec-3.1.17.0-7521/Text-ParserCombinators-Parsec.html