Skip to content

Commit 575ccc2

Browse files
committed
#49, fix up the Haddock markup in the docs for combine
1 parent 19ff17a commit 575ccc2

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

System/FilePath/Internal.hs

+15-12
Original file line numberDiff line numberDiff line change
@@ -604,35 +604,38 @@ replaceDirectory x dir = combineAlways dir (takeFileName x)
604604

605605

606606
-- | Combine two paths, if the second path starts with a path separator or a
607-
-- drive letter, then it returns the second.
607+
-- drive letter, then it returns the second.
608608
--
609609
-- > Valid x => combine (takeDirectory x) (takeFileName x) `equalFilePath` x
610610
--
611-
-- Combined:
611+
-- Combined:
612+
--
612613
-- > Posix: combine "/" "test" == "/test"
613614
-- > Posix: combine "home" "bob" == "home/bob"
614615
-- > Posix: combine "x:" "foo" == "x:/foo"
615616
-- > Windows: combine "C:\\foo" "bar" == "C:\\foo\\bar"
616617
-- > Windows: combine "home" "bob" == "home\\bob"
617618
--
618-
-- Not combined:
619+
-- Not combined:
620+
--
619621
-- > Posix: combine "home" "/bob" == "/bob"
620622
-- > Windows: combine "home" "C:\\bob" == "C:\\bob"
621623
--
622-
-- Not combined (tricky):
623-
-- On Windows, if a filepath starts with a single slash, it is relative to the
624-
-- root of the current drive. In [1], this is (confusingly) referred to as an
625-
-- absolute path.
626-
-- The current behavior of @combine@ is to never combine these forms.
624+
-- Not combined (tricky):
625+
--
626+
-- On Windows, if a filepath starts with a single slash, it is relative to the
627+
-- root of the current drive. In [1], this is (confusingly) referred to as an
628+
-- absolute path.
629+
-- The current behavior of @combine@ is to never combine these forms.
627630
--
628631
-- > Windows: combine "home" "/bob" == "/bob"
629632
-- > Windows: combine "home" "\\bob" == "\\bob"
630633
-- > Windows: combine "C:\\home" "\\bob" == "\\bob"
631634
--
632-
-- On Windows, from [1]: "If a file name begins with only a disk designator
633-
-- but not the backslash after the colon, it is interpreted as a relative path
634-
-- to the current directory on the drive with the specified letter."
635-
-- The current behavior of @combine@ is to never combine these forms.
635+
-- On Windows, from [1]: "If a file name begins with only a disk designator
636+
-- but not the backslash after the colon, it is interpreted as a relative path
637+
-- to the current directory on the drive with the specified letter."
638+
-- The current behavior of @combine@ is to never combine these forms.
636639
--
637640
-- > Windows: combine "D:\\foo" "C:bar" == "C:bar"
638641
-- > Windows: combine "C:\\foo" "C:bar" == "C:bar"

0 commit comments

Comments
 (0)