From: simonmar Date: Thu, 9 Aug 2001 11:32:15 +0000 (+0000) Subject: [project @ 2001-08-09 11:32:15 by simonmar] X-Git-Tag: Approximately_9120_patches~1296 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8f9a0b07ebaee1d72945437be3dd60d5bc577130;p=ghc-hetmet.git [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. --- 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