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. Cheers, -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe