There is a package system-filepath http://hackage.haskell.org/package/system-filepath which fixes a lot of quibbles people have with the way filepaths are implemented in haskell.  There are apparently a lot of problems with using strings as filepaths, like the fact that they are slow, that they have encoding issues, and that people cannot make a path that is system agnostic.

So the </> operator in that library just joins two filepaths together with the correct slash.


On Tue, Apr 9, 2013 at 12:15 PM, Tommy M. McGuire <mcguire@crsr.net> wrote:
On 04/09/2013 07:07 AM, Brent Yorgey wrote:
> Also, since we are discussing portability, it's a much better idea to do
>
>   homedir </> "blah_blah"
>
> instead of homedir ++ "/blah_blah", since the former will use the
> correct path separator character for whatever system it is compiled
> on.

Wait, what? Where'd "</>" come from?


--
Tommy M. McGuire
mcguire@crsr.net

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners