Re: Pure File Reading (was: Dealing with configuration data)

2002-10-11 Thread Hal Daume III
This message seems to have been lost and I'd like to try to breathe some life into it. First, a question: could such "readFilePure" functions be implemented on TOP of the current IO module (perhaps in IO.Pure or something). Of course, one could do something like: readFileOnce :: FilePath -> Ma

Re: Pure File Reading (was: Dealing with configuration data)

2002-09-26 Thread oleg
There is another solution to the problem of configurational parameters. The main part of the solution is portable, does not depend on any pragmas, does not use unsafe operations, does not use implicit parameters, and does not require any modifications to the user code. I must warn that it is also

Re: Pure File Reading (was: Dealing with configuration data)

2002-09-26 Thread Yoann Padioleau
Lars Lundgren <[EMAIL PROTECTED]> writes: > On 26 Sep 2002, Yoann Padioleau wrote: > > > Koen Claessen <[EMAIL PROTECTED]> writes: > > > > i find your idea very good. > > indeed for the library GetOpt, the argument of a program never change so it > > make sense to make this library without usi

Re: Pure File Reading (was: Dealing with configuration data)

2002-09-26 Thread Yoann Padioleau
Koen Claessen <[EMAIL PROTECTED]> writes: i find your idea very good. indeed for the library GetOpt, the argument of a program never change so it make sense to make this library without using IO monad, same for argv and for the enviroment. for openFile it seems harder, it would require to have

Re: Pure File Reading (was: Dealing with configuration data)

2002-09-26 Thread Lars Lundgren
On 26 Sep 2002, Yoann Padioleau wrote: > Koen Claessen <[EMAIL PROTECTED]> writes: > > i find your idea very good. > indeed for the library GetOpt, the argument of a program never change so it > make sense to make this library without using IO monad, same for argv and for the >enviroment. > f

Pure File Reading (was: Dealing with configuration data)

2002-09-25 Thread Koen Claessen
Dear all, At the moment, a discussion on haskell-cafe is going on about how to neatly program the fact that an entire program depends on a number of parameters that are read in once at the beginning of a program. The suggestion that many people came up with was using unsafePerformIO in the begin