Skip to content

Commit adf6119

Browse files
authored
Merge pull request #23 from slamdata/fix-shadow
Fix shadowed name warnings
2 parents 7462437 + be3b57c commit adf6119

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Data/Path/Pathy.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ peel
298298
peel Current = Nothing
299299
peel Root = Nothing
300300
peel p@(ParentIn _) = case canonicalize' p of
301-
Tuple true p -> peel p
301+
Tuple true p' -> peel p'
302302
_ -> Nothing
303303
peel (DirIn p d) = Just $ Tuple (unsafeCoerceType p) (Left d)
304304
peel (FileIn p f) = Just $ Tuple (unsafeCoerceType p) (Right f)
@@ -445,11 +445,11 @@ relativeTo p1 p2 = relativeTo' (canonicalize p1) (canonicalize p2)
445445
relativeTo' :: forall b'. Path a b' s -> Path a Dir s' -> Maybe (Path Rel b' s')
446446
relativeTo' Root Root = Just Current
447447
relativeTo' Current Current = Just Current
448-
relativeTo' p1 p2
449-
| identicalPath p1 p2 = Just Current
450-
| otherwise = case peel p1 of
451-
Just (Tuple p1' e) ->
452-
flip (</>) (either (DirIn Current) (FileIn Current) e) <$> relativeTo' p1' p2
448+
relativeTo' cp1 cp2
449+
| identicalPath cp1 cp2 = Just Current
450+
| otherwise = case peel cp1 of
451+
Just (Tuple cp1' e) ->
452+
flip (</>) (either (DirIn Current) (FileIn Current) e) <$> relativeTo' cp1' cp2
453453
Nothing -> Nothing
454454

455455
-- | Attempts to sandbox a path relative to some directory. If successful, the sandboxed

0 commit comments

Comments
 (0)