Skip to content

Commit dee127a

Browse files
committed
remove some unsafe leftover
1 parent 5b600ab commit dee127a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/Path/Pathy.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ appendPath :: forall a b s. Path a Dir s -> Path Rel b s -> Path a b s
281281
appendPath Current Current = Current
282282
appendPath Root Current = Root
283283
appendPath (ParentIn p1) Current = ParentIn (p1 </> Current)
284-
appendPath (In p1 f1) Current = In (unsafeCoerce $ p1 </> Current) (unsafeCoerce f1)
284+
appendPath (In p1 f1) Current = In (p1 </> Current) (unsafeCoerce $ f1)
285285
appendPath p1 (ParentIn p2) = ParentIn (p1 </> p2)
286286
appendPath p1 (In p2 f2) = In (p1 </> p2) f2
287287
-- following cases don't make sense but cannot exist
288288
appendPath Current Root = Current
289289
appendPath Root Root = Root
290290
appendPath (ParentIn p1) Root = ParentIn (p1 </> Current)
291-
appendPath (In p1 f1) Root = In (unsafeCoerce $ p1 </> Current) (unsafeCoerce $f1)
291+
appendPath (In p1 f1) Root = In (p1 </> Current) (unsafeCoerce $ f1)
292292

293293
infixl 6 appendPath as </>
294294

@@ -442,7 +442,7 @@ relativeTo p1 p2 = relativeTo' (canonicalize p1) (canonicalize p2)
442442
| identicalPath cp1 cp2 = pure Current
443443
| otherwise = do
444444
Tuple cp1Path name <- peel cp1
445-
rel <- relativeTo' cp1Path cp2
445+
rel <- relativeTo' cp1Path cp2
446446
pure $ overName name
447447
(\dirN -> rel </> In Current dirN)
448448
(\fileN -> rel </> In Current fileN)

0 commit comments

Comments
 (0)