summaryrefslogtreecommitdiff
path: root/ghc/compiler/absCSyn/AbsCSyn.lhs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-04-29 14:04:11 +0000
committersimonmar <unknown>2002-04-29 14:04:11 +0000
commitb085ee40c7f265a5977ea6ec1c415e573be5ff8c (patch)
treeab849b59a7eb6a57bc89559706cd71256b5898e4 /ghc/compiler/absCSyn/AbsCSyn.lhs
parentf6124b6ca2ec9820f7eb454dbcffbf4b8b790d4f (diff)
downloadhaskell-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/absCSyn/AbsCSyn.lhs')
-rw-r--r--ghc/compiler/absCSyn/AbsCSyn.lhs11
1 files changed, 5 insertions, 6 deletions
diff --git a/ghc/compiler/absCSyn/AbsCSyn.lhs b/ghc/compiler/absCSyn/AbsCSyn.lhs
index 36d3db7e6e..2389512c77 100644
--- a/ghc/compiler/absCSyn/AbsCSyn.lhs
+++ b/ghc/compiler/absCSyn/AbsCSyn.lhs
@@ -1,7 +1,7 @@
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-% $Id: AbsCSyn.lhs,v 1.46 2002/03/02 18:02:30 sof Exp $
+% $Id: AbsCSyn.lhs,v 1.47 2002/04/29 14:03:39 simonmar Exp $
%
\section[AbstractC]{Abstract C: the last stop before machine code}
@@ -53,8 +53,7 @@ import StgSyn ( StgOp )
import TyCon ( TyCon )
import BitSet -- for liveness masks
import FastTypes
-
-import Outputable
+import FastString
\end{code}
@AbstractC@ is a list of Abstract~C statements, but the data structure
@@ -174,8 +173,8 @@ stored in a mixed type location.)
-- see the notes about these next few; they follow below...
| CMacroStmt CStmtMacro [CAddrMode]
- | CCallProfCtrMacro FAST_STRING [CAddrMode]
- | CCallProfCCMacro FAST_STRING [CAddrMode]
+ | CCallProfCtrMacro FastString [CAddrMode]
+ | CCallProfCCMacro FastString [CAddrMode]
{- The presence of this constructor is a makeshift solution;
it being used to work around a gcc-related problem of
@@ -401,7 +400,7 @@ Convenience functions:
mkIntCLit :: Int -> CAddrMode
mkIntCLit i = CLit (mkMachInt (toInteger i))
-mkCString :: FAST_STRING -> CAddrMode
+mkCString :: FastString -> CAddrMode
mkCString s = CLit (MachStr s)
mkCCostCentre :: CostCentre -> CAddrMode