summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen/CodeGen.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>1999-01-27 14:52:25 +0000
committersimonpj <unknown>1999-01-27 14:52:25 +0000
commit18976e614fd90a8d81ced2c3e9cd8e38d72a1f40 (patch)
treeba006e4eab248358b818f771064df1a37e43cc16 /ghc/compiler/codeGen/CodeGen.lhs
parentf3bed25cb37981ef391f750cae58280e71cd80bc (diff)
downloadhaskell-18976e614fd90a8d81ced2c3e9cd8e38d72a1f40.tar.gz
[project @ 1999-01-27 14:51:14 by simonpj]
Finally! This commits the ongoing saga of Simon's hygiene sweep FUNCTIONALITY ~~~~~~~~~~~~~ a) The 'unused variable' warnings from the renamer work. b) Better error messages here and there, esp type checker c) Fixities for Haskell 98 (maybe I'd done that before) d) Lazy reporting of name clashes for Haskell 98 (ditto) HYGIENE ~~~~~~~ a) type OccName has its own module. OccNames are represented by a single FastString, not three as in the last round. This string is held in Z-encoded form; a decoding function decodes for printing in user error messages. There's a nice tight encoding for (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) b) type Module is a proper ADT, in module OccName c) type RdrName is a proper ADT, in its own module d) type Name has a new, somwhat tidier, representation e) much grunting in the renamer to get Provenances right. This makes error messages look better (no spurious qualifiers)
Diffstat (limited to 'ghc/compiler/codeGen/CodeGen.lhs')
-rw-r--r--ghc/compiler/codeGen/CodeGen.lhs12
1 files changed, 3 insertions, 9 deletions
diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs
index 142ee9c1fc..6bd024d70e 100644
--- a/ghc/compiler/codeGen/CodeGen.lhs
+++ b/ghc/compiler/codeGen/CodeGen.lhs
@@ -36,7 +36,7 @@ import CmdLineOpts ( opt_SccProfilingOn, opt_EnsureSplittableC,
import CostCentre ( CostCentre, CostCentreStack )
import FiniteMap ( FiniteMap )
import Id ( Id, idName )
-import Name ( Module, moduleCString, moduleString )
+import Name ( Module, moduleString )
import PrimRep ( getPrimRepSize, PrimRep(..) )
import Type ( Type )
import TyCon ( TyCon )
@@ -93,12 +93,6 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
mkAbstractCs [ cost_centre_stuff, module_code ]
where
- -----------------
- grp_name = case opt_SccGroup of
- Just xx -> _PK_ xx
- Nothing -> _PK_ (moduleString mod_name) -- default: module name
-
- -----------------
mkCcRegister ccs cc_stacks import_names
= let
register_ccs = mkAbstractCs (map mk_register ccs)
@@ -108,7 +102,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
in
[
CCallProfCCMacro SLIT("START_REGISTER_CCS")
- [ CLitLit (_PK_ ("_reg" ++ moduleCString mod_name)) AddrRep],
+ [ CLitLit (_PK_ ("_reg" ++ moduleString mod_name)) AddrRep],
register_ccs,
register_cc_stacks,
register_imports,
@@ -123,7 +117,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs)
mk_import_register import_name
= CCallProfCCMacro SLIT("REGISTER_IMPORT")
- [CLitLit (_PK_ ("_reg" ++ moduleCString import_name)) AddrRep]
+ [CLitLit (_PK_ ("_reg" ++ moduleString import_name)) AddrRep]
\end{code}
%************************************************************************