add Ord and Read instances to the encoding/decoding exceptions
Ignore-this: 5ec11b8739b241f1cc2935f5f8e34bfb darcs-hash:20121208023123-76d51-b27be713e80337673d35c2b749a52e964810b17b
This commit is contained in:
parent
7d2f55ce07
commit
9da33cd371
@ -11,7 +11,7 @@ import Control.Monad.Identity
|
|||||||
data EncodingException
|
data EncodingException
|
||||||
= HasNoRepresentation Char -- ^ Thrown if a specific character
|
= HasNoRepresentation Char -- ^ Thrown if a specific character
|
||||||
-- is not representable in an encoding.
|
-- is not representable in an encoding.
|
||||||
deriving (Eq,Show,Typeable)
|
deriving (Eq,Ord,Show,Read,Typeable)
|
||||||
|
|
||||||
instance Exception EncodingException
|
instance Exception EncodingException
|
||||||
|
|
||||||
@ -25,6 +25,6 @@ data DecodingException
|
|||||||
| OutOfRange -- ^ the decoded value was out of the unicode range
|
| OutOfRange -- ^ the decoded value was out of the unicode range
|
||||||
| IllegalRepresentation [Word8] -- ^ The character sequence encodes a
|
| IllegalRepresentation [Word8] -- ^ The character sequence encodes a
|
||||||
-- character, but is illegal.
|
-- character, but is illegal.
|
||||||
deriving (Eq,Show,Typeable)
|
deriving (Eq,Ord,Show,Read,Typeable)
|
||||||
|
|
||||||
instance Exception DecodingException
|
instance Exception DecodingException
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user