We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3abd056 commit 6780a87Copy full SHA for 6780a87
src/Pathy/Path.purs
@@ -269,7 +269,12 @@ setExtension p ext = rename (alterExtension (const (NES.fromString ext))) p
269
270
infixl 6 setExtension as <.>
271
272
--- | Makes a path relative to a reference path.
+-- | Makes a path relative to a reference path. This function is best
273
+-- | explaned using this property:
274
+-- |
275
+-- | ```purescript
276
+-- | a == r </> a `relativeTo` r
277
+-- | ```
278
relativeTo :: forall b. Path Abs b -> Path Abs Dir -> Path Rel b
279
relativeTo p rp = coeB $ step Init (canonicalize (coeD p)) (canonicalize rp)
280
where
0 commit comments