Restrict parentAbs return to Dir

This commit is contained in:
Chris Done 2015-05-11 08:58:34 +02:00
parent cb5545f2fe
commit c0e93d2167
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name: path name: path
version: 0.0.1 version: 0.1.0
synopsis: Path synopsis: Path
description: Path description: Path
license: BSD3 license: BSD3

View File

@ -240,7 +240,7 @@ isParentOf p l =
-- --
-- @parentAbs (parentAbs \"\/\") = \"\/\"@ -- @parentAbs (parentAbs \"\/\") = \"\/\"@
-- --
parentAbs :: Path Abs t -> Path Abs t parentAbs :: Path Abs t -> Path Abs Dir
parentAbs (Path fp) = parentAbs (Path fp) =
Path (normalizeDir (FilePath.takeDirectory (FilePath.dropTrailingPathSeparator fp))) Path (normalizeDir (FilePath.takeDirectory (FilePath.dropTrailingPathSeparator fp)))