Skip to content

Commit 1b00b67

Browse files
committed
Effects: rm pathExists in favour of doesPathExist
1 parent d1e35a3 commit 1b00b67

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
* Additional:
77

8+
* `Nix.Effects`:
9+
* rm `pathExits` in favour of `doesPathExist` (in `Nix.Render`: `class MonadFile`: `doesPathExist`)
10+
811
* `Nix.Utils`:
912
* added type `TransformF`
1013

src/Nix/Builtins.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,8 @@ pathExistsNix nvpath =
11461146
path <- demand nvpath
11471147
toValue =<<
11481148
case path of
1149-
NVPath p -> pathExists p
1150-
NVStr ns -> pathExists $ toString $ stringIgnoreContext ns
1149+
NVPath p -> doesPathExist p
1150+
NVStr ns -> doesPathExist $ toString $ stringIgnoreContext ns
11511151
_v -> throwError $ ErrorCall $ "builtins.pathExists: expected path, got " <> show _v
11521152

11531153
isAttrsNix

src/Nix/Effects.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,3 @@ addPath p =
448448

449449
toFile_ :: (Framed e m, MonadStore m) => FilePath -> String -> m StorePath
450450
toFile_ p contents = addTextToStore (toText p) (toText contents) HS.empty False
451-
452-
453-
-- * misc
454-
455-
-- Please, get rid of pathExists in favour of @doesPathExist@
456-
pathExists :: MonadFile m => FilePath -> m Bool
457-
pathExists = doesPathExist

0 commit comments

Comments
 (0)