[Haskell] System.FilePath survey

Bulat Ziganshin bulatz at HotPOP.com
Mon Feb 6 04:08:12 EST 2006

Hello Einar,

Saturday, February 04, 2006, 12:00:18 AM, you wrote:

>> KA>     * Do you think that we have to use unboxed arrays of Word8/Word16
>> KA> for file path?

well, if FilePath should be ADT, then:

1) all operations that returns filenames (getFileContents, anything
more?) should return this ADT instead

2) this ADT should support conversion to/from String (for interaction
with users) and to/from [Word8] (to send these values across
storage/network). Of course, these conversions should be as exact and
revertible as possible, i think that at least we can make guarantee
for ascii chars

3) all operations that receives filenames should accept a _class_
which includes String/[Word8]/this ADT

of course, this means incompatible changes in the APIs, so it's better
to introduce new fucntions that  returns ADT/accepts class  with a new

Best regards,
 Bulat                            mailto:bulatz at HotPOP.com

More information about the Libraries mailing list