Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2004-08-16 09:53:47 by simonpj] · 4e325538
    Simon Peyton Jones authored
    -------------------------------
    	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.
    4e325538