git.iko.soy/typeable/attoparsec
on master help sign in
Move code around.
commitb80a721160591e1461ec02ebbc933af8e01975ef authorBryan O'Sullivan <bos@serpentine.com> dateWed 24 Jan 2007, 18:30 (20 years ago) parent1f89c57
1 file changed+2−3
ByteStringParser.hs → src/Text/ParserCombinators/ByteStringParser.hs+2−3
ByteStringParser.hs → src/Text/ParserCombinators/ByteStringParser.hsrenamed+2−3
@@ -14,7 +14,6 @@
1414module Text.ParserCombinators.ByteStringParser where
1515
1616import Data.Char
17−import Data.Word
1817import Control.Monad
1918import qualified Data.ByteString.Lazy.Char8 as C
2019
@@ -190,7 +189,7 @@ skipMany1 p = p >> skipMany p
190189notEmpty :: Parser C.ByteString C.ByteString -> Parser C.ByteString C.ByteString
191190notEmpty (Parser p) =
192191 Parser $ \s -> case p s of
193− o@(Right (a, s_)) ->
192+ o@(Right (a, _)) ->
194193 if C.null a
195194 then Left (a, ["notEmpty"])
196195 else o
@@ -222,7 +221,7 @@ parse p s =
222221 showError [msg] = "Parser error, expected:\n" ++ msg ++ "\n"
223222 showError msgs = "Parser error, expected one of:\n" ++ unlines msgs
224223
225−parseTest :: Parser st a -> st -> IO ()
224+parseTest :: (Show st, Show a) => Parser st a -> st -> IO ()
226225
227226parseTest p s =
228227 case parse p s of