Proposal: Add System.FilePath to base
ndmitchell at gmail.com
Fri Nov 24 06:51:25 EST 2006
> Yes, I understand what these modules do, I was just surprised that the
> documentation for both modules was empty. I expected to see the same interface
> as System.FilePath. Why the #ifdef __HADDOCK__ in System/FilePath/Posix.hs?
Rather than listing the similarities I found it easier to explain the
differences, and where you should be using them. I can certainly
revert to having the full interface shown.
> Also, rather than having 3 copies of System.FilePath, we should have at most 2
> (this is just an implementation issue, of course).
Agreed. For my standalone FilePath implementation I do have 3
genuinely different implementations - FilePath selects on the OS at
runtime, Windows is one way, Posix is the other. This is done so that
FilePath doesn't require cpp, so that people developing against the
FilePath module in hugs (i.e. me!) don't have to preprocess it. That
also means it has to use nasty CPP tricks, i.e. macro substitution,
instead of just conditional compilation.
Before actually submitting the code to base, I will move to a more
standard base way of doing things, relying on CPP for all modules, and
only including 2 actual modules. It's not too hard to do that, but
it's probably easier to do it once at the end, hence I am waiting til
a result is reached.
More information about the Libraries