cvs commit: fptools/ghc/compiler/main PprTyThing.hs

Simon Marlow simonmar at haskell.org
Wed Jun 15 08:03:46 EDT 2005


simonmar    2005/06/15 05:03:46 PDT

  Added files:
    ghc/compiler/main    PprTyThing.hs 
  Log:
  Re-implement GHCi's :info and :browse commands in terms of TyThings
  rather than IfaceSyn.
  
  The GHC API now exposes its internal types for Haskell entities:
  TyCons, Classes, DataCons, Ids and Instances (collectively known as
  TyThings), so we can inspect these directly to pretty-print
  information about an entity.  Previously the internal representations
  were converted to IfaceSyn for passing to InteractiveUI, but we can
  now remove that code.
  
  Some of the new code comes via Visual Haskell, but I've changed it
  around a lot to fix various dark corners and properly print things
  like GADTs.
  
  The pretty-printing interfaces for TyThings are exposed by a new
  module PprTyThing, which is implemented purely in terms of the GHC API
  (and is probably a good source of sample code).  Visual Haskell should
  be able to use the functions exported by this module directly.
  
  Lots of new goodies are exported by the GHC module, mainly for
  inspecting TyThings.


More information about the Cvs-ghc mailing list