[project @ 2001-10-18 16:29:12 by simonpj]
authorsimonpj <unknown>
Thu, 18 Oct 2001 16:29:14 +0000 (16:29 +0000)
committersimonpj <unknown>
Thu, 18 Oct 2001 16:29:14 +0000 (16:29 +0000)
commit685e04e4af2e2332f2555990122596c7931cb543
treeaa917912eace65eee0650a61f81a31cbc4fb9aa9
parent25e8bcade5f62dcd25b1f070ab9e680a7240c8c7
[project @ 2001-10-18 16:29:12 by simonpj]
----------------------------------------------
The CoreTidy/CorePrep/CoreToStg saga continues
[actually, this commit mostly completes the job]
----------------------------------------------

DO NOT MERGE!

* CorePrep injects implicit bindings, not the type checker,
  nor CgConTbls.   (This way, all the code generators see
  them, so no need to fiddle with the byte code generator.)

  As a result, all bindings in the module are for LocalIds,
  at least until CoreTidy.   This is a Big Win.

  Hence remove nasty isImplicitId test in update_bndr in
  SimplCore and DmdAnal

* hasNoBinding is no longer true of a dataConId (worker).
  There's an implicit curried binding for it.

* Remove yukky test in exprIsTrivial that did not regard
  a hasNoBinding Id as trivial; similarly in SimplUtils.tryEtaReduce

* In CoreTidy, get the names to avoid from the type env.
  That way it includes implicit bindings too.

* CoreTidy set the Arity of a top-level Id permanently;
  it's up to the rest of the compiler to respect it.
  Notably, CorePrep uses etaExpand to make the manifest arity
  match the claimed arity.

* As a result, nuke CgArity, so that CgInfo now contains only
  CafInfo.  The CafInfo is knot-tied as before.

Other things

* In Simplify.simplLazyBind, be a bit keener to float bindings
  out if it's a top-level binding.
18 files changed:
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/codeGen/CgConTbls.lhs
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/coreSyn/CorePrep.lhs
ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/MkIface.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/compiler/stgSyn/CoreToStg.lhs
ghc/compiler/stranal/DmdAnal.lhs
ghc/compiler/typecheck/TcIfaceSig.lhs
ghc/compiler/typecheck/TcModule.lhs