[Haskell-cafe] Core packages and locale support

Felipe Lessa felipe.lessa at gmail.com
Sat Jun 26 09:14:50 EDT 2010

On Sat, Jun 26, 2010 at 05:01:06PM +0400, Bulat Ziganshin wrote:
> >> > Even if we said "we don't care", we at least should change
> >> > FilePath to be [Word8], and not [String].  Currently filepaths
> > other OSs worked fine, should I use this API (i.e. type FilePath
> > = String) to its fullest extent, my program will suddently become
> > unportable to all Unix OSs.
> but what you propose cannot be used in Windows at all! while current
> FilePath still works on Unix, with manual filenames en/decoding

Now we got back on topic! :)

The FilePath datatype is OS-dependent and making it abstract
should be at least a first step.  If you got it from somewhere
else where it is already encoded, then fine.  If you need to
construct it, then you need to use a smart constructor.  If you
need to show/print it, then you need to convert it to String.
And so on.



More information about the Haskell-Cafe mailing list