[darcs-users] darcs patch: Avoid getSymbolicLinkStatus in mmap implementation, wo...

Eric Kow kowey at darcs.net
Sun Jun 21 14:10:06 UTC 2009


On Fri, Jun 19, 2009 at 10:37:03 +0100, Eric Kow wrote:
> Applied, thanks!

Actually, not applied...

> Avoid getSymbolicLinkStatus in mmap implementation, works around GHC 6.8.2 bug.
> -------------------------------------------------------------------------------
> > -                     size <- fileSize `fmap` getSymbolicLinkStatus f
> > +                     -- size <- fileSize `fmap` getSymbolicLinkStatus f
> > +                     -- GHC 6.8.2 returns garbage, workaround:
> > +                     size <- hFileSize =<< openBinaryFile f

[  7 of 135] Compiling ByteStringUtils  ( src/ByteStringUtils.hs, dist/build/ByteStringUtils.o )

src/ByteStringUtils.hs:449:43:
    Couldn't match expected type `IO Handle'
           against inferred type `IOMode -> IO Handle'
    In the second argument of `(=<<)', namely `openBinaryFile f'
    In a stmt of a 'do' expression:
        size <- hFileSize =<< openBinaryFile f
    In the expression:
        do size <- hFileSize =<< openBinaryFile f
           if size == 0 then
               return BC.empty
           else  performGC >> mmapFileByteString f Nothing

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090621/85d1dabe/attachment.pgp>


More information about the darcs-users mailing list