Proposal: Add System.FilePath to base

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Nov 24 07:15:01 EST 2006


Hello Neil,

Friday, November 24, 2006, 2:51:25 PM, you wrote:

> 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.

i think that the best way is to

module FilePath

import FilePath.Windows as Windows
import FilePath.Unix    as Unix

isProperPath = if weOnWindows
                 then Windows.isProperPath
                 else Unix.isProperPath

then GHC can optimize it, throwing away unused branch at compile-time.
and yhc will work just fine with its portable bytecode


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Libraries mailing list