path-like: PathLike, FileLike and DirLike type classes for the Path library.

[ filesystem, library, mit ] [ Propose Tags ]

Type classes for the Path library. Exports PathLike, FileLike and DirLike classes so that stricter types may be used as Paths.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.2.0.0, 0.2.0.1, 0.2.0.2
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), path [details]
License MIT
Copyright 2020 Daniel Firth
Author Daniel Firth
Maintainer dan.firth@homotopic.tech
Category Filesystem
Source repo head: git clone https://gitlab.com/homotopic-tech/path-like
Uploaded by locallycompact at 2020-07-04T17:52:59Z
Distributions LTSHaskell:0.2.0.2, NixOS:0.2.0.2, Stackage:0.2.0.2
Reverse Dependencies 2 direct, 2 indirect [details]
Downloads 1356 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-07-04 [all 1 reports]

Readme for path-like-0.1.1.0

[back to package description]

path-like - Type classes for the Path library.

This library exports type classes PathLike, FileLike and DirLike which serve as a common interface for compiling types down to Path b File and Path b Dir. The only contract that should be respected is that your type should be at least as strict as the Path type itself, i.e no String/FilePath instances. This is the case with the within type.

This library also exports a concatenation function (/>) which defers to the underlying (</>) function in Path, but works for any DirLike and PathLike Rel. This may change to shadow the existing definition if these classes turn out to be generally useful. They tend to be particularly useful for generalising file IO, but you may find you need to cast more when you first construct a Path using TemplateHaskell.

For more information see the path library documentation.