[Haskell-cafe] File path programme
simonmar at microsoft.com
Wed Jan 26 10:56:05 EST 2005
On 26 January 2005 15:50, Keean Schupke wrote:
> You could define a type in the library using conditional compilation:
> #ifdef Unix
> type SystemPath = UnixPath
> #ifdef Windows
> type SystemPath = WindowsPath
> Then you do:
> let myPath = (emptyPath :: SystemPath) in ...
Portable library APIs are not supposed to vary between platforms.
More information about the Libraries