xeno-0.6: A fast event-based XML parser in pure Haskell

Safe Haskell | Safe-Inferred
Language | Haskell2010

Xeno.Types

Description

Shared types.

Synopsis

- data XenoException
  - = XenoStringIndexProblem {
    - stringIndex :: Int
    - inputString :: ByteString
    }
  - | XenoParseError {
    - inputIndex :: Int
    - message :: ByteString
    }
  - | XenoExpectRootNode
- newtype ByteStringZeroTerminated = BSZT ByteString

# Documentation

data XenoException Source #

Constructors

XenoStringIndexProblem |

Fields

- stringIndex :: Int
- inputString :: ByteString

XenoParseError |

Fields

- inputIndex :: Int
- message :: ByteString

XenoExpectRootNode |

#### Instances

Instances details

NFData XenoException Source # |
Instance details Defined in Xeno.Types Methods rnf :: XenoException -> () Source #
Data XenoException Source # |

Instance details

Defined in Xeno.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> XenoException -> c XenoException Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c XenoException Source #

toConstr :: XenoException -> Constr Source #

dataTypeOf :: XenoException -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c XenoException) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c XenoException) Source #

gmapT :: (forall b. Data b => b -> b) -> XenoException -> XenoException Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> XenoException -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> XenoException -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> XenoException -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> XenoException -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> XenoException -> m XenoException Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> XenoException -> m XenoException Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> XenoException -> m XenoException Source #

Exception XenoException Source # |
Instance details Defined in Xeno.Types Methods toException :: XenoException -> SomeException Source # fromException :: SomeException -> Maybe XenoException Source # displayException :: XenoException -> String Source # backtraceDesired :: XenoException -> Bool Source #
Generic XenoException Source # |

Instance details

Defined in Xeno.Types

Associated Types

type Rep XenoException |

Instance details

Defined in Xeno.Types

type Rep XenoException = D1 ('MetaData "XenoException" "Xeno.Types" "xeno-0.6-4lbB5Si8JPZ2CKzaKvB30X" 'False) (C1 ('MetaCons "XenoStringIndexProblem" 'PrefixI 'True) (S1 ('MetaSel ('Just "stringIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "inputString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: (C1 ('MetaCons "XenoParseError" 'PrefixI 'True) (S1 ('MetaSel ('Just "inputIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "XenoExpectRootNode" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: XenoException -> Rep XenoException x Source #

to :: Rep XenoException x -> XenoException Source #

Show XenoException Source # |
Instance details Defined in Xeno.Types Methods showsPrec :: Int -> XenoException -> ShowS Source # show :: XenoException -> String Source # showList :: [XenoException] -> ShowS Source #
MonadFail (Either XenoException) Source # |
Instance details Defined in Xeno.Types Methods fail :: String -> Either XenoException a Source #
type Rep XenoException Source # |

Instance details

Defined in Xeno.Types

type Rep XenoException = D1 ('MetaData "XenoException" "Xeno.Types" "xeno-0.6-4lbB5Si8JPZ2CKzaKvB30X" 'False) (C1 ('MetaCons "XenoStringIndexProblem" 'PrefixI 'True) (S1 ('MetaSel ('Just "stringIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "inputString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: (C1 ('MetaCons "XenoParseError" 'PrefixI 'True) (S1 ('MetaSel ('Just "inputIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "XenoExpectRootNode" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype ByteStringZeroTerminated Source #

ByteString wich guaranted have 'NUL' at the end

Constructors

BSZT ByteString |

#### Instances

Instances details

NFData ByteStringZeroTerminated Source # |
Instance details Defined in Xeno.Types Methods rnf :: ByteStringZeroTerminated -> () Source #
Generic ByteStringZeroTerminated Source # |

Instance details

Defined in Xeno.Types

Associated Types

type Rep ByteStringZeroTerminated |
Instance details Defined in Xeno.Types type Rep ByteStringZeroTerminated = D1 ('MetaData "ByteStringZeroTerminated" "Xeno.Types" "xeno-0.6-4lbB5Si8JPZ2CKzaKvB30X" 'True) (C1 ('MetaCons "BSZT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

Methods

from :: ByteStringZeroTerminated -> Rep ByteStringZeroTerminated x Source #

to :: Rep ByteStringZeroTerminated x -> ByteStringZeroTerminated Source #

StringLike ByteStringZeroTerminated Source # |
Instance details Defined in Xeno.SAX Methods s_index' :: ByteStringZeroTerminated -> Int -> Word8 Source # elemIndexFrom' :: Word8 -> ByteStringZeroTerminated -> Int -> Maybe Int Source # drop' :: Int -> ByteStringZeroTerminated -> ByteStringZeroTerminated Source # substring' :: ByteStringZeroTerminated -> Int -> Int -> ByteString Source # toBS :: ByteStringZeroTerminated -> ByteString Source #
type Rep ByteStringZeroTerminated Source # |
Instance details Defined in Xeno.Types type Rep ByteStringZeroTerminated = D1 ('MetaData "ByteStringZeroTerminated" "Xeno.Types" "xeno-0.6-4lbB5Si8JPZ2CKzaKvB30X" 'True) (C1 ('MetaCons "BSZT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))