Skip to content

Commit

Permalink
#49, move the docs from </> to combine, so its all in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Dec 22, 2015
1 parent 575ccc2 commit a479073
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions System/FilePath/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ replaceDirectory x dir = combineAlways dir (takeFileName x)
-- | Combine two paths, if the second path starts with a path separator or a
-- drive letter, then it returns the second.
--
-- > Posix: "/directory" </> "file.ext" == "/directory/file.ext"
-- > Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
-- > Valid x => combine (takeDirectory x) (takeFileName x) `equalFilePath` x
--
-- Combined:
Expand Down Expand Up @@ -654,9 +656,6 @@ combineAlways a b | null a = b


-- | Join two values with a path separator. For examples and caveats see the equivalent function 'combine'.
--
-- > Posix: "/directory" </> "file.ext" == "/directory/file.ext"
-- > Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
(</>) :: FilePath -> FilePath -> FilePath
(</>) = combine

Expand Down

0 comments on commit a479073

Please sign in to comment.