From d8f94105eec0a2319323415f94d8c579d0e29d95 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 3 Dec 2012 14:58:12 -0800 Subject: [PATCH] throw -> throwException; all tests now pass Ignore-this: 9ca8029db67a3f2a55e74b9d2f5deb90 darcs-hash:20121203225812-76d51-341b22e3205a2d5348ab7bf2df4320824b01a172 --- Data/Encoding/ByteSource.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Encoding/ByteSource.hs b/Data/Encoding/ByteSource.hs index 1fb6997..2385f02 100644 --- a/Data/Encoding/ByteSource.hs +++ b/Data/Encoding/ByteSource.hs @@ -108,7 +108,7 @@ instance ByteSource (StateT [Char] Identity) where fetchWord8 = do chs <- get case chs of - [] -> throw UnexpectedEnd + [] -> throwException UnexpectedEnd c:cs -> do put cs return (fromIntegral $ ord c) @@ -144,7 +144,7 @@ instance ByteSource (StateT [Char] (Either DecodingException)) where instance (Monad m,Throws DecodingException m) => ByteSource (StateT BS.ByteString m) where sourceEmpty = gets BS.null fetchWord8 = StateT (\str -> case BS.uncons str of - Nothing -> throw UnexpectedEnd + Nothing -> throwException UnexpectedEnd Just (c,cs) -> return (c,cs)) fetchAhead act = do str <- get