Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f629db72
Commit
f629db72
authored
Feb 17, 1999
by
simonpj
Browse files
[project @ 1999-02-17 21:53:27 by simonpj]
Add z-encodings for ^ and %
parent
1ad39b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/basicTypes/OccName.lhs
View file @
f629db72
...
...
@@ -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
$
d
m... 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment