[commit: packages/filepath] master: #47, reformat badElements so it's easier to see what they are (63eaad2)

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


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

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/63eaad27f3620993bdae0806a5f71c9a91714c2a

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

commit 63eaad27f3620993bdae0806a5f71c9a91714c2a
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Tue Dec 22 11:24:53 2015 +0000

    #47, reformat badElements so it's easier to see what they are


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

63eaad27f3620993bdae0806a5f71c9a91714c2a
 System/FilePath/Internal.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/System/FilePath/Internal.hs b/System/FilePath/Internal.hs
index e659921..4228376 100644
--- a/System/FilePath/Internal.hs
+++ b/System/FilePath/Internal.hs
@@ -846,8 +846,12 @@ normaliseDrive drive = if isJust $ readDriveLetter x2
 -- Information for validity functions on Windows. See [1].
 badCharacters :: [Char]
 badCharacters = ":*?><|\""
+
 badElements :: [FilePath]
-badElements = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "CLOCK$"]
+badElements =
+    ["CON","PRN","AUX","NUL","CLOCK$"
+    ,"COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9"
+    ,"LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"]
 
 
 -- | Is a FilePath valid, i.e. could you create a file like it? This function checks for invalid names,



More information about the ghc-commits mailing list