From 0ab55dfc3c44b94fae036b55cbb3d67f9b0e642a Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Mon, 12 Dec 2011 20:31:35 -0800 Subject: [PATCH] Make the Tiny benchmark build again. --- benchmarks/Tiny.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/Tiny.hs b/benchmarks/Tiny.hs index a33cfaeb..43b5df9e 100644 --- a/benchmarks/Tiny.hs +++ b/benchmarks/Tiny.hs @@ -1,7 +1,7 @@ -import Control.Applicative ((<|>)) +import Control.Applicative ((<|>), many) import Control.Monad (forM_) import System.Environment (getArgs) -import qualified Data.Attoparsec.Char8 as A +import qualified Data.Attoparsec.ByteString.Char8 as A import qualified Data.ByteString.Char8 as B import qualified Text.Parsec as P import qualified Text.Parsec.ByteString as P @@ -14,8 +14,8 @@ attoparsec = do A.Done _ xs -> print (length xs) what -> print what where - slow = A.many (A.many1 A.letter_ascii <|> A.many1 A.digit) - fast = A.many (A.takeWhile1 isLetter <|> A.takeWhile1 isDigit) + slow = many (A.many1 A.letter_ascii <|> A.many1 A.digit) + fast = many (A.takeWhile1 isLetter <|> A.takeWhile1 isDigit) isDigit c = c >= '0' && c <= '9' isLetter c = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') p = fast