[darcs-users] [darcs-devel] lift2Sealed
Jason Dagit
dagit at codersbase.com
Thu May 29 18:41:14 UTC 2008
On Thu, May 29, 2008 at 11:02 AM, Taral <taralx at gmail.com> wrote:
> On 5/28/08, Jason Dagit <dagit at codersbase.com> wrote:
> > They are only identical up to strictness, and there they differ.
>
> How so? They are both strict in f, iox, ioy, no?
The short version is strict in iox and ioy because
Sealed x <- iox
is strict due to the pattern match.
At some point unseal was rewritten, I think by David, to not be lazy. So
the part "unseal seal `fmap`", does a lazy reseal, and the
unsafeInterleaveIO is meant to be there so that when we do the necessary
pattern match it doesn't cause all of iox to happen.
I can't recall why just:
Sealed x <- unsafeInterleaveIO iox
doesn't do the trick.
But, I do recall this being discussed, at least by David and myself, because
this change was the result of some change I made that was forcing the entire
repository to be read during some operations.
I hope that explains it better.
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-users/attachments/20080529/b26de4cd/attachment.htm
More information about the darcs-users
mailing list