Re: [Haskell] Re: System.FilePath survey
On Mon, Feb 06, 2006 at 03:36:17PM +, Simon Marlow wrote: > So I'm of the opinion that introducing an ADT for FilePaths is something > that should wait until the I/O library is revised. In the meantime, we > should include a String-based Data.FilePath library in Haskell'. It's > not as elegant, but it's terribly practical, and that's one goal of > Haskell'. > > As a first step, can someone package up Data.FilePath as a Cabal package > so that at least we can all start using the same one? how about we take the library as is for now and then add newtype FilePath = FilePath String filePathToString (FilePath s) = s stringToFilePath s = FilePath s that way, when FilePath is replaced by something more interesting, no code dealing with it needs to change as it is already written to an ADT (though a simple one for now) and we could experiment with more advanced representations without breaking anyones code. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Re: System.FilePath survey
On Mon, Feb 06, 2006 at 03:36:17PM +, Simon Marlow wrote: > The reason we can't just go right ahead and do The Right Thing (i.e. > introduce a new ADT for FilePaths) is because it touches so much other > stuff, including stuff that also needs revising, so it doesn't feel > right to just fix the FilePath library. > > Experience with GHC releases has left me with the opinion that it's > better to group breaking changes together rather than dribble them out - > people only have to modify their code once, and conditional compilation > gets fewer cases. > > So I'm of the opinion that introducing an ADT for FilePaths is something > that should wait until the I/O library is revised. In the meantime, we > should include a String-based Data.FilePath library in Haskell'. It's > not as elegant, but it's terribly practical, and that's one goal of > Haskell'. I don't see why merely introducing an ADT would break anyone's code, as there is no existing standard filepath model, therefore no code to break! The code I posted works with the current IO library and uses an ADT. I also think it has the potential to be compatible with a redesigned IO library. I further believe in incremental change when possible. So if it's possible to try out a "better" approach to filepaths (whatever "better" may be) without redesigning IO, IMO that's exactly what we should do. Now it may be that the need for a filepath library is so great, and "better" approaches sufficiently untested, that we should use whatever exists and works right now. But that is a separate question. Andrew ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Re: System.FilePath survey
On 2/6/06, Simon Marlow <[EMAIL PROTECTED]> wrote: > Isaac Jones wrote: > > > Has anyone yet volunteered to do the hard work of defining an ADT and > > made a proposal for how it should interact w/ the System.IO functions? > > > > I think that lacking a FilePath module is a serious problem that is > > holding haskell back. Lots of languages use String for filepath, like > > Python, which is hugely popular for these uses, but has nothing on > > Haskell, IMO, except this single library. > > > > Lots of people have written home-grown FilePath modules. How long can > > we wait for an implementation to appear? > > The reason we can't just go right ahead and do The Right Thing (i.e. > introduce a new ADT for FilePaths) is because it touches so much other > stuff, including stuff that also needs revising, so it doesn't feel > right to just fix the FilePath library. > > Experience with GHC releases has left me with the opinion that it's > better to group breaking changes together rather than dribble them out - > people only have to modify their code once, and conditional compilation > gets fewer cases. > > So I'm of the opinion that introducing an ADT for FilePaths is something > that should wait until the I/O library is revised. In the meantime, we > should include a String-based Data.FilePath library in Haskell'. It's > not as elegant, but it's terribly practical, and that's one goal of > Haskell'. > > As a first step, can someone package up Data.FilePath as a Cabal package > so that at least we can all start using the same one? Already done. Darcs repository: http://scannedinavian.com/~lemmih/FilePath/ Tarball: http://hackage.haskell.org/packages/FilePath-0.1.0.tgz -- Friendly, Lemmih ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Re: System.FilePath survey
Isaac Jones wrote: Has anyone yet volunteered to do the hard work of defining an ADT and made a proposal for how it should interact w/ the System.IO functions? I think that lacking a FilePath module is a serious problem that is holding haskell back. Lots of languages use String for filepath, like Python, which is hugely popular for these uses, but has nothing on Haskell, IMO, except this single library. Lots of people have written home-grown FilePath modules. How long can we wait for an implementation to appear? The reason we can't just go right ahead and do The Right Thing (i.e. introduce a new ADT for FilePaths) is because it touches so much other stuff, including stuff that also needs revising, so it doesn't feel right to just fix the FilePath library. Experience with GHC releases has left me with the opinion that it's better to group breaking changes together rather than dribble them out - people only have to modify their code once, and conditional compilation gets fewer cases. So I'm of the opinion that introducing an ADT for FilePaths is something that should wait until the I/O library is revised. In the meantime, we should include a String-based Data.FilePath library in Haskell'. It's not as elegant, but it's terribly practical, and that's one goal of Haskell'. As a first step, can someone package up Data.FilePath as a Cabal package so that at least we can all start using the same one? Cheers, Simon ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell