diff options
author | simonpj <unknown> | 1998-12-18 17:42:39 +0000 |
---|---|---|
committer | simonpj <unknown> | 1998-12-18 17:42:39 +0000 |
commit | 7e602b0a11e567fcb035d1afd34015aebcf9a577 (patch) | |
tree | 54ca13c3ec0704e343b68d0d313a29f53d6c3855 /ghc/compiler/codeGen/CodeGen.lhs | |
parent | 139f0fd30e19f934aa51885a52b8e5d7c24ee460 (diff) | |
download | haskell-7e602b0a11e567fcb035d1afd34015aebcf9a577.tar.gz |
[project @ 1998-12-18 17:40:31 by simonpj]
Another big commit from Simon. Actually, the last one
didn't all go into the main trunk; because of a CVS glitch it
ended up in the wrong branch.
So this commit includes:
* Scoped type variables
* Warnings for unused variables should work now (they didn't before)
* Simplifier improvements:
- Much better treatment of strict arguments
- Better treatment of bottoming Ids
- No need for w/w split for fns that are merely strict
- Fewer iterations needed, I hope
* Less gratuitous renaming in interface files and abs C
* OccName is a separate module, and is an abstract data type
I think the whole Prelude and Exts libraries compile correctly.
Something isn't quite right about typechecking existentials though.
Diffstat (limited to 'ghc/compiler/codeGen/CodeGen.lhs')
-rw-r--r-- | ghc/compiler/codeGen/CodeGen.lhs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs index 6b97d3fc29..142ee9c1fc 100644 --- a/ghc/compiler/codeGen/CodeGen.lhs +++ b/ghc/compiler/codeGen/CodeGen.lhs @@ -34,19 +34,19 @@ import CmdLineOpts ( opt_SccProfilingOn, opt_EnsureSplittableC, opt_SccGroup ) import CostCentre ( CostCentre, CostCentreStack ) -import CStrings ( modnameToC ) import FiniteMap ( FiniteMap ) import Id ( Id, idName ) -import Name ( Module ) +import Name ( Module, moduleCString, moduleString ) import PrimRep ( getPrimRepSize, PrimRep(..) ) import Type ( Type ) import TyCon ( TyCon ) import BasicTypes ( TopLevelFlag(..) ) import Util +import Panic ( assertPanic ) \end{code} \begin{code} -codeGen :: FAST_STRING -- module name +codeGen :: Module -- module name -> ([CostCentre], -- local cost-centres needing declaring/registering [CostCentre], -- "extern" cost-centres needing declaring [CostCentreStack]) -- pre-defined "singleton" cost centre stacks @@ -96,7 +96,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs) ----------------- grp_name = case opt_SccGroup of Just xx -> _PK_ xx - Nothing -> mod_name -- default: module name + Nothing -> _PK_ (moduleString mod_name) -- default: module name ----------------- mkCcRegister ccs cc_stacks import_names @@ -108,7 +108,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs) in [ CCallProfCCMacro SLIT("START_REGISTER_CCS") - [ CLitLit (modnameToC (SLIT("_reg") _APPEND_ mod_name)) AddrRep], + [ CLitLit (_PK_ ("_reg" ++ moduleCString mod_name)) AddrRep], register_ccs, register_cc_stacks, register_imports, @@ -123,7 +123,7 @@ codeGen mod_name (local_CCs, extern_CCs, singleton_CCSs) mk_import_register import_name = CCallProfCCMacro SLIT("REGISTER_IMPORT") - [CLitLit (modnameToC (SLIT("_reg") _APPEND_ import_name)) AddrRep] + [CLitLit (_PK_ ("_reg" ++ moduleCString import_name)) AddrRep] \end{code} %************************************************************************ |