Pure File Reading (was: Dealing with configuration data)
Lars Lundgren
d95lars@dtek.chalmers.se
Thu, 26 Sep 2002 15:39:04 +0200 (MEST)
On 26 Sep 2002, Yoann Padioleau wrote:
> Koen Claessen <koen@cs.chalmers.se> 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 a lock on the file
> to be sure that no one modify the file, same for a webpage.
>
No, not at all. All that is required is to make sure all calls to openFile
f returns the same string, i.e the contents of the file when it was read
the first time.
/Lars L