[Haskell-cafe] Re: Network parsing and parsec

Benjamin Franksen benjamin.franksen at bessy.de
Tue Sep 20 18:32:56 EDT 2005


On Tuesday 20 September 2005 16:50, John Goerzen wrote:
> On the flip side, Parsec is really nice.  I wonder how easy it would
> be to make it parse [Word8] instead of String?  

Isn't Parsec parameterized over the token type?

> Or even a 
> FastPackedString? (And how easy it would be to get that instead of a
> String from hGetContents)?

From the FPS haddock:

hGetContents :: Handle -> IO FastString

  Read entire handle contents into a FastString.

This may or may not do what you want...it's probably not a lazy read.

Ben


More information about the Haskell-Cafe mailing list