encoding
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Encoding.Exception

Synopsis

Documentation

data EncodingException #

This exception type is thrown whenever something went wrong during the encoding-process.

Constructors

HasNoRepresentation Char

Thrown if a specific character is not representable in an encoding.

Instances

Instances details
Exception EncodingException # 
Instance details

Defined in Data.Encoding.Exception

Read EncodingException # 
Instance details

Defined in Data.Encoding.Exception

Show EncodingException # 
Instance details

Defined in Data.Encoding.Exception

Methods

showsPrec :: Int -> EncodingException -> ShowS

show :: EncodingException -> String

showList :: [EncodingException] -> ShowS

Eq EncodingException # 
Instance details

Defined in Data.Encoding.Exception

Ord EncodingException # 
Instance details

Defined in Data.Encoding.Exception

Throws EncodingException PutM # 
Instance details

Defined in Data.Encoding.ByteSink

Methods

throwException :: EncodingException -> PutM a #

Throws EncodingException PutME # 
Instance details

Defined in Data.Encoding.ByteSink

Throws EncodingException StrictSink # 
Instance details

Defined in Data.Encoding.ByteSink

Throws EncodingException StrictSinkE # 
Instance details

Defined in Data.Encoding.ByteSink

Throws EncodingException StrictSinkExplicit # 
Instance details

Defined in Data.Encoding.ByteSink

data DecodingException #

This exception type is thrown whenever something went wrong during the decoding-process.

Constructors

IllegalCharacter Word8

The sequence contained an illegal byte that couldn't be decoded.

UnexpectedEnd

more bytes were needed to allow a successfull decoding.

OutOfRange

the decoded value was out of the unicode range

IllegalRepresentation [Word8]

The character sequence encodes a character, but is illegal.

Instances

Instances details
Exception DecodingException # 
Instance details

Defined in Data.Encoding.Exception

Read DecodingException # 
Instance details

Defined in Data.Encoding.Exception

Show DecodingException # 
Instance details

Defined in Data.Encoding.Exception

Methods

showsPrec :: Int -> DecodingException -> ShowS

show :: DecodingException -> String

showList :: [DecodingException] -> ShowS

Eq DecodingException # 
Instance details

Defined in Data.Encoding.Exception

Ord DecodingException # 
Instance details

Defined in Data.Encoding.Exception

Throws DecodingException Get # 
Instance details

Defined in Data.Encoding.ByteSource

ByteSource (StateT ByteString (Either DecodingException)) # 
Instance details

Defined in Data.Encoding.ByteSource

Methods

sourceEmpty :: StateT ByteString (Either DecodingException) Bool #

fetchWord8 :: StateT ByteString (Either DecodingException) Word8 #

fetchAhead :: StateT ByteString (Either DecodingException) (Maybe a) -> StateT ByteString (Either DecodingException) (Maybe a) #

fetchWord16be :: StateT ByteString (Either DecodingException) Word16 #

fetchWord16le :: StateT ByteString (Either DecodingException) Word16 #

fetchWord32be :: StateT ByteString (Either DecodingException) Word32 #

fetchWord32le :: StateT ByteString (Either DecodingException) Word32 #

fetchWord64be :: StateT ByteString (Either DecodingException) Word64 #

fetchWord64le :: StateT ByteString (Either DecodingException) Word64 #

ByteSource (StateT [Char] (Either DecodingException)) # 
Instance details

Defined in Data.Encoding.ByteSource

Methods

sourceEmpty :: StateT [Char] (Either DecodingException) Bool #

fetchWord8 :: StateT [Char] (Either DecodingException) Word8 #

fetchAhead :: StateT [Char] (Either DecodingException) (Maybe a) -> StateT [Char] (Either DecodingException) (Maybe a) #

fetchWord16be :: StateT [Char] (Either DecodingException) Word16 #

fetchWord16le :: StateT [Char] (Either DecodingException) Word16 #

fetchWord32be :: StateT [Char] (Either DecodingException) Word32 #

fetchWord32le :: StateT [Char] (Either DecodingException) Word32 #

fetchWord64be :: StateT [Char] (Either DecodingException) Word64 #

fetchWord64le :: StateT [Char] (Either DecodingException) Word64 #