System.FilePath propsal (Was: Cabal feedback notes)

Krasimir Angelov ka2_mail at yahoo.com
Tue Oct 26 14:30:20 EDT 2004


--- Peter Simons <simons at cryp.to> wrote:
> I think the use of FilePath is not a good idea to
> begin
> with. A file path should be a data type something
> like this,
> IMHO:
> 
>   type Segment = String
>   data FilePath = Path [Segment]
>                 | RootedPath [Segment]
> 
> You shouldn't write slashes or backslashes which are
> converted later, you should use a, say :/: operator
> to build
> paths portably right from the start. 

I don't think I will be happy with that. Most of I/O
functions in Haskell uses FilePath as String. If we
use data type instead of String we need to pretty
print/parse the structure each time when we use it for
I/O.

Cheers,
  Krasimir


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


More information about the Libraries mailing list