[commit: ghc] master: Add a kludge to the compare tool for unicode filenames (d1fd45d)
Ian Lynagh
igloo at earth.li
Sun Jan 27 17:49:04 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d1fd45d122131bb9b07784bf3afe280162089483
>---------------------------------------------------------------
commit d1fd45d122131bb9b07784bf3afe280162089483
Author: Ian Lynagh <ian at well-typed.com>
Date: Sun Jan 27 16:26:35 2013 +0000
Add a kludge to the compare tool for unicode filenames
It thought that something impossible was happening when they
were involved.
>---------------------------------------------------------------
distrib/compare/FilenameDescr.hs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/distrib/compare/FilenameDescr.hs b/distrib/compare/FilenameDescr.hs
index 37fd499..a0f53fd 100644
--- a/distrib/compare/FilenameDescr.hs
+++ b/distrib/compare/FilenameDescr.hs
@@ -1,6 +1,7 @@
module FilenameDescr where
+import Data.Char
import Data.Either
import Data.List
@@ -32,7 +33,11 @@ checkContent buildInfo (fd, tl)
Right fn' ->
if fn' == fn
then []
- else ["checkContent: Can't happen: filename mismatch: " ++ show fn]
+ else if all isAscii fn
+ then ["checkContent: Can't happen: filename mismatch: "
+ ++ show fn]
+ else [] -- Ugly kludge; don't worry too much if filepaths
+ -- containing non-ASCII chars have gone wrong
Left errs ->
errs
More information about the ghc-commits
mailing list