@@ -826,10 +826,10 @@ gridTableFooter = blanklines
828-- | Parse a string with a given parser and state.
828-- | Parse a string with a given parser and state.
829−readWith :: (Show s, Stream s Identity Char)
829+readWith :: (Stream [Char] Identity Char)
830− => ParserT s st Identity a -- ^ parser
830+ => ParserT [Char] st Identity a -- ^ parser
831− -> st -- ^ initial state
831+ -> st -- ^ initial state
832− -> s -- ^ input
832+ -> [Char] -- ^ input
834readWith parser state input =
834readWith parser state input =
835 case runParser parser state "source" input of
835 case runParser parser state "source" input of
@@ -837,16 +837,16 @@ readWith parser state input =
837 let errPos = errorPos err'
837 let errPos = errorPos err'
838 errLine = sourceLine errPos
838 errLine = sourceLine errPos
839 errColumn = sourceColumn errPos
839 errColumn = sourceColumn errPos
840− theline = (lines (show input) ++ [""]) !! (errLine - 1)
840+ theline = (lines input ++ [""]) !! (errLine - 1)
841 in error $ "\nError at " ++ show err' ++ "\n" ++
841 in error $ "\nError at " ++ show err' ++ "\n" ++
842 theline ++ "\n" ++ replicate (errColumn - 1) ' ' ++
842 theline ++ "\n" ++ replicate (errColumn - 1) ' ' ++
844 Right result -> result
844 Right result -> result
846-- | Parse a string with @parser@ (for testing).
846-- | Parse a string with @parser@ (for testing).
847−testStringWith :: (Show s, Show a, Stream s Identity Char)
847+testStringWith :: (Show a, Stream [Char] Identity Char)
848− => ParserT s ParserState Identity a
848+ => ParserT [Char] ParserState Identity a
851testStringWith parser str = UTF8.putStrLn $ show $
851testStringWith parser str = UTF8.putStrLn $ show $
852 readWith parser defaultParserState str
852 readWith parser defaultParserState str