[project @ 2004-08-16 09:53:47 by simonpj]
authorsimonpj <unknown>
Mon, 16 Aug 2004 09:54:51 +0000 (09:54 +0000)
committersimonpj <unknown>
Mon, 16 Aug 2004 09:54:51 +0000 (09:54 +0000)
commit4e3255388e8b99ccdae290bfcb6cd666b8c93d4a
treea529ae3bfdeecbb6ecd55910be06c7990c922892
parentd32c5227315009f38355fe3233f0f4e5b1f61dc6
[project @ 2004-08-16 09:53:47 by simonpj]
-------------------------------
Add instance information to :i
  Get rid of the DeclPool
-------------------------------

1.  Add instance information to :info command.  GHCi now prints out
    which instances a type or class belongs to, when you use :i

2.  Tidy up printing of unqualified names in user output.
    Previously Outputable.PrintUnqualified was
type PrintUnqualified = Name -> Bool
    but it's now
type PrintUnqualified = ModuleName -> OccName -> Bool
    This turns out to be tidier even for Names, and it's now also usable
    when printing IfaceSyn stuff in GHCi, eliminating a grevious hack.

3.  On the way to doing this, Simon M had the great idea that we could
    get rid of the DeclPool holding pen, which held declarations read from
    interface files but not yet type-checked.   We do this by eagerly
    populating the TypeEnv with thunks what, when poked, do the type
    checking.   This is just a logical continuation of lazy import
    mechanism we've now had for some while.

The InstPool and RulePool still exist, but I plan to get rid of them in
the same way.  The new scheme does mean that more rules get sucked in than
before, because previously the TypeEnv was used to mean "this thing was needed"
and hence to control which rules were sucked in.  But now the TypeEnv is
populated more eagerly => more rules get sucked in.  However this problem
will go away when I get rid of the Inst and Rule pools.

I should have kept these changes separate, but I didn't.  Change (1)
affects mainly
TcRnDriver, HscMain, CompMan, InteractiveUI
whereas change (3) is more wide ranging.
26 files changed:
ghc/compiler/basicTypes/DataCon.lhs
ghc/compiler/basicTypes/Name.lhs
ghc/compiler/basicTypes/NameEnv.lhs
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/iface/IfaceEnv.lhs
ghc/compiler/iface/IfaceSyn.lhs
ghc/compiler/iface/IfaceType.lhs
ghc/compiler/iface/LoadIface.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/iface/TcIface.hi-boot-6
ghc/compiler/iface/TcIface.lhs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/types/InstEnv.lhs
ghc/compiler/utils/Outputable.lhs
ghc/compiler/utils/UniqFM.lhs