From 8f9a0b07ebaee1d72945437be3dd60d5bc577130 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 9 Aug 2001 11:32:15 +0000 Subject: [PATCH] [project @ 2001-08-09 11:32:15 by simonmar] Oops, only ASCII alphanumeric characters are allowed to be used unencoded in C identifiers, but Char.isAlphaNum includes ISO-8851 alphanumeric characters. --- ghc/compiler/basicTypes/OccName.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/basicTypes/OccName.lhs b/ghc/compiler/basicTypes/OccName.lhs index 3cc7372..f7e7c17 100644 --- a/ghc/compiler/basicTypes/OccName.lhs +++ b/ghc/compiler/basicTypes/OccName.lhs @@ -480,7 +480,9 @@ encodeFS fast_str | all unencodedChar str = fast_str unencodedChar :: Char -> Bool -- True for chars that don't need encoding unencodedChar 'Z' = False unencodedChar 'z' = False -unencodedChar c = ISALPHANUM c +unencodedChar c = c >= 'a' && c <= 'z' + || c >= 'A' && c <= 'Z' + || c >= '0' && c <= '9' encode_ch :: Char -> EncodedString encode_ch c | unencodedChar c = [c] -- Common case first -- 1.7.10.4