Commit Graph

19 Commits

Author SHA1 Message Date
Julian Ospald 3e6d93182a
Abstract over Path more properly
We don't expect "Path Abs" everywhere anymore. The functions
have been made to be more generic. A user can still pass
absolute paths, so we don't lose any safety. However, some
function implementations may be more tricky.
2018-04-11 01:11:00 +02:00
Julian Ospald 5d5b0ae3c1
Add missing language pragma 2016-06-14 19:32:14 +02:00
Julian Ospald f47c8edb42
Fix build for GHC < 7.10 2016-06-14 19:21:03 +02:00
Julian Ospald ef66a24f87
Improve error handling
* remove some obsolete functions and error types from HPath.IO.Errors
  that are completely unused
* reworked the RecursiveFailure type to contain more information,
  so we can use it to programmatically make useful choices
  without examining the weakly types IO error attributes (like
  'ioGetFileName')
2016-06-14 19:13:25 +02:00
Julian Ospald a5942ff026
Use IfElse package for whenM/unlessM 2016-06-05 21:52:52 +02:00
Julian Ospald d3eb2fc254
Fix build with GHC-7.8 2016-06-05 16:12:51 +02:00
Julian Ospald 64ae6db83a
New API: use CopyMode for overwriting and introduce RecursiveMode
This allows to specify the behavior on recursive operations,
such that one can collect failures instead of dying on the first
failure.
2016-06-05 03:13:33 +02:00
Julian Ospald 69dbf6714d
Relicense to BSD3 2016-06-04 00:39:03 +02:00
Julian Ospald 4032629407
Add TODO 2016-05-24 03:26:07 +02:00
Julian Ospald 47dd729e8a
Small documentation improvements 2016-05-22 13:41:39 +02:00
Julian Ospald 797dcaf725
Backport changes from posix-paths PR:
* add isFileName
* add hasParentDir
* add hiddenFile
* add our own openFd version for more control
* small documentation improvements
* add a getDirectoryContents' version that works on Fd
* fix linting warnings
* lift version constraints in benchmark

Also adjust HPath.IO to work with the new API.
2016-05-18 04:11:40 +02:00
Julian Ospald 05fcad14f1
HPath.IO.Errors: minor documentation fix 2016-05-10 02:02:05 +02:00
Julian Ospald eb27c368e6
HPath.IO.Errors: explicit exports, improve haddock compat 2016-05-10 00:35:33 +02:00
Julian Ospald d8b0b99edf
HPath.IO.Errors: provide all exception constructor checkers 2016-05-10 00:13:14 +02:00
Julian Ospald 794c3a2fc4
HPath.IO.Errors: remove obsolete HPathIOException constructors 2016-05-10 00:12:43 +02:00
Julian Ospald 8a28a5dd0f
HPath.IO.Errors: fix throwDestinationInSource
'canonicalizePath' was missing, making this function far less reliable.
In order for this to work we have to work around circular imports
with a IO.hs-boot file.
2016-05-10 00:11:42 +02:00
Julian Ospald 930b021a32
Add missing (<$>) imports 2016-05-09 18:53:26 +02:00
Julian Ospald f27becc4df
Cleanup, improve docs 2016-05-09 17:37:16 +02:00
Julian Ospald 86a4b9ade2
Add IO modules, previously from HSFM 2016-05-09 16:53:31 +02:00