[commit: ghc] wip/check-uniques-fix: CheckUniques: Decode source files as UTF-8 (a038d43)

git at git.haskell.org git at git.haskell.org
Thu Jun 30 10:18:41 UTC 2016


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

On branch  : wip/check-uniques-fix
Link       : http://ghc.haskell.org/trac/ghc/changeset/a038d43bd7c8148be0ff532c981f58b448a3cd90/ghc

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

commit a038d43bd7c8148be0ff532c981f58b448a3cd90
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Jun 30 12:17:49 2016 +0200

    CheckUniques: Decode source files as UTF-8


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

a038d43bd7c8148be0ff532c981f58b448a3cd90
 utils/checkUniques/check-uniques.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/checkUniques/check-uniques.py b/utils/checkUniques/check-uniques.py
index 42b375e..0ab1cfd 100755
--- a/utils/checkUniques/check-uniques.py
+++ b/utils/checkUniques/check-uniques.py
@@ -12,7 +12,7 @@ def find_uniques(source_files):
     uniques = defaultdict(lambda: defaultdict(lambda: set()))
     unique_re = re.compile(r"([\w\d]+)\s*=\s*mk([\w\d']+)Unique\s+(\d+)")
     for f in source_files:
-        ms = unique_re.findall(open(f).read())
+        ms = unique_re.findall(open(f).read().decode('utf8'))
         for m in ms:
             name = m[0]
             _type = m[1]



More information about the ghc-commits mailing list