[commit: packages/filepath] master: #49, fix up the Haddock markup in the docs for combine (575ccc2)

git at git.haskell.org git at git.haskell.org
Mon Dec 28 20:39:40 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/575ccc2bbdf0bef7e35a8d927b5dc2e4cee04508

>---------------------------------------------------------------

commit 575ccc2bbdf0bef7e35a8d927b5dc2e4cee04508
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Tue Dec 22 08:06:22 2015 +0000

    #49, fix up the Haddock markup in the docs for combine


>---------------------------------------------------------------

575ccc2bbdf0bef7e35a8d927b5dc2e4cee04508
 System/FilePath/Internal.hs | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/System/FilePath/Internal.hs b/System/FilePath/Internal.hs
index 60903cc..1e95d17 100644
--- a/System/FilePath/Internal.hs
+++ b/System/FilePath/Internal.hs
@@ -604,35 +604,38 @@ 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.
+--   drive letter, then it returns the second.
 --
 -- > Valid x => combine (takeDirectory x) (takeFileName x) `equalFilePath` x
 --
--- Combined:
+--   Combined:
+--
 -- > Posix:   combine "/" "test" == "/test"
 -- > Posix:   combine "home" "bob" == "home/bob"
 -- > Posix:   combine "x:" "foo" == "x:/foo"
 -- > Windows: combine "C:\\foo" "bar" == "C:\\foo\\bar"
 -- > Windows: combine "home" "bob" == "home\\bob"
 --
--- Not combined:
+--   Not combined:
+--
 -- > Posix:   combine "home" "/bob" == "/bob"
 -- > Windows: combine "home" "C:\\bob" == "C:\\bob"
 --
--- Not combined (tricky):
--- On Windows, if a filepath starts with a single slash, it is relative to the
--- root of the current drive. In [1], this is (confusingly) referred to as an
--- absolute path.
--- The current behavior of @combine@ is to never combine these forms.
+--   Not combined (tricky):
+--
+--   On Windows, if a filepath starts with a single slash, it is relative to the
+--   root of the current drive. In [1], this is (confusingly) referred to as an
+--   absolute path.
+--   The current behavior of @combine@ is to never combine these forms.
 --
 -- > Windows: combine "home" "/bob" == "/bob"
 -- > Windows: combine "home" "\\bob" == "\\bob"
 -- > Windows: combine "C:\\home" "\\bob" == "\\bob"
 --
--- On Windows, from [1]: "If a file name begins with only a disk designator
--- but not the backslash after the colon, it is interpreted as a relative path
--- to the current directory on the drive with the specified letter."
--- The current behavior of @combine@ is to never combine these forms.
+--   On Windows, from [1]: "If a file name begins with only a disk designator
+--   but not the backslash after the colon, it is interpreted as a relative path
+--   to the current directory on the drive with the specified letter."
+--   The current behavior of @combine@ is to never combine these forms.
 --
 -- > Windows: combine "D:\\foo" "C:bar" == "C:bar"
 -- > Windows: combine "C:\\foo" "C:bar" == "C:bar"



More information about the ghc-commits mailing list