[Haskell-beginners] Bytestring question

Peter Braun peter-braun at gmx.net
Wed Jan 26 19:37:18 CET 2011


Thanks for your reply. Attoparsec seems to be the perfect tool for the 
job and i will ultimately try to implement my converter utilizing it. 
But i also installed bytestring-lexing and will try this out, just to 
see if i can gain some performance when eliminating the suboptimal reads 
/ unpacks. Thanks for the tip!

Shouldn't the type better be

parseFile :: Handle ->  StlLineType ->  [L.ByteString] ->  IO ()

Yes, there really is no reason for using a tuple. I'll also eliminate 
the usage of (!!) and function calls where pattern matching is possible.



More information about the Beginners mailing list