Re: [Haskell-cafe] hGetContents and lazyness

2008-09-22 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Max Vasin wrote: > Hello, haskellers! > > Suppose we have function (it filters package filenames from apt Packages > file): > >> getPackageList :: FilePath -> IO [FilePath] >> getPackageList packageFile = withFile packageFile ReadMode $ >>

Fwd: [Haskell-cafe] hGetContents and lazyness

2008-09-22 Thread Rafael Gustavo da Cunha Pereira Pinto
-- Forwarded message -- From: Rafael Gustavo da Cunha Pereira Pinto <[EMAIL PROTECTED]> Date: Mon, Sep 22, 2008 at 15:46 Subject: Re: [Haskell-cafe] hGetContents and lazyness To: Max Vasin <[EMAIL PROTECTED]> Why don't you use OpenFile? > getPackageL

[Haskell-cafe] hGetContents and lazyness

2008-09-22 Thread Max Vasin
Hello, haskellers! Suppose we have function (it filters package filenames from apt Packages file): > getPackageList :: FilePath -> IO [FilePath] > getPackageList packageFile = withFile packageFile ReadMode $ > \h -> do c <- hGetContents h >