System.FilePath patch
Neil Mitchell
ndmitchell at gmail.com
Mon Mar 12 22:14:40 EDT 2007
Hi,
A good 3 months after discussion came to a close, here is a patch to
implement System.FilePath in the base library.
THE IMPLEMENTATION:
System.FilePath imports and exports one of System.FilePath.Windows or
System.FilePath.Posix based that platform.
System.FilePath.Internal.hs is not a real Haskell module, but has all
the core code for both the Windows and Posix versions.
System.FilePath.Windows/Posix just #include Internal, with the
appropriate defines.
The actual Internal.hs is all the reviewed code, identical to how it
was when agreed upon.
NOTES:
I've tested the modules as best I can, and they do seem to work, but
when it comes to base I'm not entirely sure what I'm doing so, someone
might want to take a quick check that I haven't done anything silly.
In order to check "am I running on Windows" I have done:
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
That is just a complete guess based on what was elsewhere in base.
Introducing something semantically better like WINDOWS might be
better.
TESTING INFRASTRUCTURE:
I have a load of tests in the code, along with a utility to generate a
test script from Internal.hs. What wants doing with this is someone
else's call, the options are:
* Don't care about the tests (a bit of a shame)
* Run the test generation utility, and shove the result in a testing
repo somewhere
* Add the test generation utility, and build code to get it all working
This can be dealt with after the above patch goes in.
Any last comments, or can this be committed?
Thanks
Neil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: System.FilePath.patch.gz
Type: application/x-gzip
Size: 24037 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/libraries/attachments/20070313/e698244c/System.FilePath.patch-0001.bin
More information about the Libraries
mailing list