pathtype
Version 0.8.1.2 revision 2 uploaded by HenningThielemann.
Package meta
- Synopsis
- Type-safe replacement for System.FilePath etc
- Description
This package provides type-safe access to filepath manipulations.
System.Path is designed to be used instead of System.FilePath. (It is intended to provide versions of functions from that module which have equivalent functionality but are more typesafe). System.Path.Directory is a companion module providing a type-safe alternative to System.Directory.
The heart of this package is the
Path ar fd
abstract type which represents file and directory paths. The idea is that there are two type parameters - the first should be Abs or Rel, and the second File or Dir. A number of type synonyms are provided for common types:type Path.AbsFile = Path Abs File type Path.RelFile = Path Rel File type Path.AbsDir = Path Abs Dir type Path.RelDir = Path Rel Dir type Path.Abs fd = Path Abs fd type Path.Rel fd = Path Rel fd type Path.File ar = Path ar File type Path.Dir ar = Path ar Dir
The type of the combine (aka </>) function gives the idea:
(</>) :: Path.Dir ar -> Path.Rel fd -> Path ar fd
Together this enables us to give more meaningful types to a lot of the functions, and (hopefully) catch a bunch more errors at compile time.
For more details see the README.md file.
Related packages:
filepath
: The API of Neil Mitchell's System.FilePath module (and properties satisfied) heavily influenced our package.path
: Provides a wrapper type around FilePath and maps to functions fromfilepath
package. This warrants consistency withfilepath
functions. Requires Template Haskell.data-filepath
: Requires Typeable and Template Haskell.
- Author
- Ben Moseley, Ben Millwood, Henning Thielemann
- Bug reports
- n/a
- Category
- System
- Copyright
- n/a
- Homepage
- https://hub.darcs.net/thielema/pathtype/
- Maintainer
- haskell@henning-thielemann.de
- Package URL
- n/a
- Stability
- experimental