@@ -14,7 +14,6 @@
14module Text.ParserCombinators.ByteStringParser where
14module Text.ParserCombinators.ByteStringParser where
16import Data.Char
16import Data.Char
18import Control.Monad
17import Control.Monad
19import qualified Data.ByteString.Lazy.Char8 as C
18import qualified Data.ByteString.Lazy.Char8 as C
@@ -190,7 +189,7 @@ skipMany1 p = p >> skipMany p
190notEmpty :: Parser C.ByteString C.ByteString -> Parser C.ByteString C.ByteString
189notEmpty :: Parser C.ByteString C.ByteString -> Parser C.ByteString C.ByteString
191notEmpty (Parser p) =
190notEmpty (Parser p) =
192 Parser $ \s -> case p s of
191 Parser $ \s -> case p s of
193− o@(Right (a, s_)) ->
192+ o@(Right (a, _)) ->
194 if C.null a
193 if C.null a
195 then Left (a, ["notEmpty"])
194 then Left (a, ["notEmpty"])
@@ -222,7 +221,7 @@ parse p s =
222 showError [msg] = "Parser error, expected:\n" ++ msg ++ "\n"
221 showError [msg] = "Parser error, expected:\n" ++ msg ++ "\n"
223 showError msgs = "Parser error, expected one of:\n" ++ unlines msgs
222 showError msgs = "Parser error, expected one of:\n" ++ unlines msgs
225−parseTest :: Parser st a -> st -> IO ()
224+parseTest :: (Show st, Show a) => Parser st a -> st -> IO ()
227parseTest p s =
226parseTest p s =
228 case parse p s of
227 case parse p s of