Re: A problem about hGetContents -- with another question

2003-01-23 Thread Dean Herington
I was unhappy with the use of `error` in my first solution, so I wrote a second solution that's more robust. It also demonstrates monadic style. The new solution is at the bottom. Dean On Thu, 23 Jan 2003, Dean Herington wrote: On Sun, 19 Jan 2003, Nick Name wrote: I got another

Re: A problem about hGetContents -- with another question

2003-01-22 Thread Dean Herington
On Sun, 19 Jan 2003, Nick Name wrote: I got another trouble: I need to build a record type like Package { name :: String, version :: Int , mantainer :: String ... other fields ... } from a list of string of the form [Package: ... , Mantainer: ... , Version: ... , ... ] where the

Re: A problem about hGetContents -- with another question

2003-01-19 Thread Nick Name
On Sun, 19 Jan 2003 08:51:31 -0800 Mark P Jones [EMAIL PROTECTED] wrote: linesFromFile = fmap lines . readFile Nice :) BTW, is readFile implemented with some strict evaluation construct ? I got another trouble: I need to build a record type like Package { name :: String, version :: Int