more unsafePerformIO questions (is it safe to use with ReadMode Handles)?

Ganesh Sittampalam ganesh@earth.li
Tue, 19 Aug 2003 10:47:45 +0100


On Tue, 19 Aug 2003 10:27:23 +0100, "Simon Marlow" <simonmar@microsoft.com>
wrote:

>If the databases *do* change over time, then there are two
>possibilities:
>
>  1. the contents change due to external factors only
>  2. the contents change because this program doing the writing
>
>in (1), you can still pretend the interface is pure, by imagining that
>all the changes happened earlier.  This works as long as you only read
>the external data once.

Isn't there the possibility of inlining causing a read to happen twice even
if it only appears to happen once?

Ganesh