[darcs-users] darcs patch: switch to zlib 0.5.0.0 with new interfac... (and 2 more)
E.Y.Kow at brighton.ac.uk
E.Y.Kow at brighton.ac.uk
Sun Nov 2 14:42:58 UTC 2008
Franchise is a bit of a moving target and not yet documented, so for the
moment, it might be for us (maintainers) to take on the franchise burden
for a while.
A mini franchise how-to
-----------------------
Since I wasn't the one to write the zlib patch, I didn't know what the
franchise Setup.hs should be testing for. To find out, I looked in two places:
1. The patch itself to determine how we are using the new zlib
* darcs changes -p 'switch to zlib 0.5'
2. API-documentation to determine how zlib 0.4.0.4 differ
* http://hackage.haskell.org/packages/archive/zlib/0.4.0.4/doc/html/Codec-Compression-GZip.html
* http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/doc/html/Codec-Compression-GZip.html
These two sources of information let me know that I should be testing for
decompressWith.
Also, the function you want in franchise is requireModuleExporting. This
function takes three String arguments: a module name, some imports and a bit of
code. To find out how this is used (until more documentation arrives), look in
the source code for Distribution.Franchise.Ghc ; there you will see that the
function tryModule (which is indirectly called by requireModuleExporting)
creates a temporary Haskell file with:
unlines $ ["import "++m++" ("++imports++")",
"main:: IO ()",
"main = undefined ("++code++")"]
which it then test compiles
About the patches
-----------------
Also, the last patch switches the defaults so that we start using the
Haskell zlib in earnest... Maybe in the future we can consider
simplifying our zlib/libz code
Sun Oct 26 10:26:50 GMT 2008 Ganesh Sittampalam <ganesh at earth.li>
* switch to zlib 0.5.0.0 with new interface for specifying decompressed size
Sun Nov 2 14:15:25 GMT 2008 Eric Kow <E.Y.Kow at brighton.ac.uk>
* Extend zlib franchise test to look for zlib 0.5.0.0
Sun Nov 2 14:20:53 GMT 2008 Eric Kow <E.Y.Kow at brighton.ac.uk>
* Make checking for Haskell zlib the default (franchise)
and only then fall back to C libz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 88083 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081102/20c697aa/attachment-0001.bin
More information about the darcs-users
mailing list