From 446b52bf72c4de02049628c8affefc78740fc356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Enr=C3=ADquez?= Date: Tue, 24 Jan 2023 19:35:59 +0100 Subject: [PATCH] [temporary] Clarify comment --- src/Xrefcheck/System.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Xrefcheck/System.hs b/src/Xrefcheck/System.hs index 6684b3b8..153058ca 100644 --- a/src/Xrefcheck/System.hs +++ b/src/Xrefcheck/System.hs @@ -49,6 +49,10 @@ askWithinCI = lookupEnv "CI" <&> \case -- This type exist in contrast to 'FilePath' which, in this project, -- is used for platform-dependent file paths and related filesystem -- IO operations. +-- +-- Note that `RelPosixLink` may contain `\` characters, but they are +-- considered as part of the filename instead of denoting a path +-- separator. newtype RelPosixLink = RelPosixLink { unRelPosixLink :: Text } deriving newtype (Show, Eq, Ord, NFData, Buildable, Pretty) @@ -72,6 +76,8 @@ RelPosixLink a RelPosixLink b = -- Get the platform-dependent file path from a 'RelPosixLink' -- considered as relative to another given platform-dependent -- 'FilePath'. +-- +-- In Windows, every `\` occurrence will be replaced by `/`. filePathFromRoot :: FilePath -> RelPosixLink -> FilePath filePathFromRoot rootPath = (rootPath FP.) . toString