throw -> throwException; all tests now pass

Ignore-this: 9ca8029db67a3f2a55e74b9d2f5deb90

darcs-hash:20121203225812-76d51-341b22e3205a2d5348ab7bf2df4320824b01a172
This commit is contained in:
Daniel Wagner 2012-12-03 14:58:12 -08:00
parent 789bc64b4c
commit d8f94105ee

View File

@ -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