Personal tools


From HaskellWiki

Revision as of 18:57, 20 November 2006 by NeilMitchell (Talk | contribs)

Jump to: navigation, search

I have written a System.FilePath module in part based on the one in Yhc, and in part based on the one in Cabal (thanks to Lemmih). The aim is to try and get this module into the base package, as FilePath's are something many programs use, but its all too easy to hack up a little function that gets it right most of the time on most platforms, and there lies a source of bugs.

This module is Posix (Linux) and Windows capable - just import System.FilePath and it will pick the right one. Of course, if you demand Windows paths on all OS's, then System.FilePath.Windows will give you that (same with Posix). Written in Haskell 98 + Hierarchical Modules.

If you go to the haddock page there are a few little examples at the top of the file.

The Yhc project, hquickfile and a few other utilites are already using this module succesfully.

Comments welcome. Thanks

1 Support

The following people support the addition of FilePath into base:

  • Neil Mitchell

2 Oppose

The following people oppose the addition of FilePath, with (optionally) the reason after. Please create a new item in the list for the reasons.

  • Example 1 (1,2,3)
  • Example 2 (3)

3 Opposed reasons

  1. type FilePath = String is a bad design choice, which should not be encouraged
  2. The base libraries are not the place for a FilePath library
  3. The interface in this library is poorly designed