[Haskell-cafe] Parsec and binary files

Atila Romero atilaromero at yahoo.com.br
Thu Jun 8 10:49:40 EDT 2006

Im trying to use parsec to split a file, using the null character as a 
Works fine with very small files but fails if they are a little bit larger.
I guess parsec is trying to parse everthing first and print the results 
Am I doing something wrong or parsec is just not the right tool to the job?


module Main where

import Text.ParserCombinators.Parsec
import Data.Char

email =
    do email <- anyChar `manyTill` char(chr(00))
       return email

emails =
    do emails <- many email
       return emails

main =
    do input <- getContents
       parseTest emails input

Novo Yahoo! Messenger com voz: Instale agora e faça ligações de graça. 

More information about the Haskell-Cafe mailing list