From f629db724575a3b9e1a26ab3937c701a02722b7d Mon Sep 17 00:00:00 2001 From: simonpj Date: Wed, 17 Feb 1999 21:53:27 +0000 Subject: [PATCH] [project @ 1999-02-17 21:53:27 by simonpj] Add z-encodings for ^ and % --- ghc/compiler/basicTypes/OccName.lhs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/basicTypes/OccName.lhs b/ghc/compiler/basicTypes/OccName.lhs index 139a17f..ee2ead7 100644 --- a/ghc/compiler/basicTypes/OccName.lhs +++ b/ghc/compiler/basicTypes/OccName.lhs @@ -366,7 +366,7 @@ Here's our convention for splitting up the interface file name space: (local variables, so no name-clash worries) $f... dict-fun identifiers (from inst decls) - $m... default methods + $dm... default methods $p... superclass selectors $w... workers $T... compiler-generated tycons for dictionaries @@ -619,6 +619,8 @@ encode_ch '\'' = "zq" encode_ch '\\' = "zr" encode_ch '/' = "zs" encode_ch '*' = "zt" +encode_ch '^' = "zu" +encode_ch '%' = "zv" encode_ch c = ['z', 'x', intToDigit hi, intToDigit lo] where (hi,lo) = ord c `quotRem` 16 @@ -661,6 +663,8 @@ decode_escape ('q' : rest) = '\'' : decode rest decode_escape ('r' : rest) = '\\' : decode rest decode_escape ('s' : rest) = '/' : decode rest decode_escape ('t' : rest) = '*' : decode rest +decode_escape ('u' : rest) = '^' : decode rest +decode_escape ('v' : rest) = '%' : decode rest decode_escape ('x' : d1 : d2 : rest) = chr (digitToInt d1 * 16 + digitToInt d2) : decode rest -- Tuples are coded as Z23T -- 1.7.10.4