diff options
author | simonmar <unknown> | 2002-04-29 14:04:11 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-04-29 14:04:11 +0000 |
commit | b085ee40c7f265a5977ea6ec1c415e573be5ff8c (patch) | |
tree | ab849b59a7eb6a57bc89559706cd71256b5898e4 /ghc/compiler/javaGen/JavaGen.lhs | |
parent | f6124b6ca2ec9820f7eb454dbcffbf4b8b790d4f (diff) | |
download | haskell-b085ee40c7f265a5977ea6ec1c415e573be5ff8c.tar.gz |
[project @ 2002-04-29 14:03:38 by simonmar]
FastString cleanup, stage 1.
The FastString type is no longer a mixture of hashed strings and
literal strings, it contains hashed strings only with O(1) comparison
(except for UnicodeStr, but that will also go away in due course). To
create a literal instance of FastString, use FSLIT("..").
By far the most common use of the old literal version of FastString
was in the pattern
ptext SLIT("...")
this combination still works, although it doesn't go via FastString
any more. The next stage will be to remove the need to use this
special combination at all, using a RULE.
To convert a FastString into an SDoc, now use 'ftext' instead of
'ptext'.
I've also removed all the FAST_STRING related macros from HsVersions.h
except for SLIT and FSLIT, just use the relevant functions from
FastString instead.
Diffstat (limited to 'ghc/compiler/javaGen/JavaGen.lhs')
-rw-r--r-- | ghc/compiler/javaGen/JavaGen.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/compiler/javaGen/JavaGen.lhs b/ghc/compiler/javaGen/JavaGen.lhs index ae6d19a4ca..55b2b716c1 100644 --- a/ghc/compiler/javaGen/JavaGen.lhs +++ b/ghc/compiler/javaGen/JavaGen.lhs @@ -228,7 +228,7 @@ javaLit (MachInt i) = Literal (IntLit (fromInteger i)) javaLit (MachChar c) = Literal (CharLit c) javaLit (MachStr fs) = Literal (StringLit str) where - str = concatMap renderString (_UNPK_ fs) ++ "\\000" + str = concatMap renderString (unpackFS fs) ++ "\\000" -- This should really handle all the chars 0..31. renderString '\NUL' = "\\000" renderString other = [other] |