[project @ 2005-06-15 12:03:19 by simonmar]
authorsimonmar <unknown>
Wed, 15 Jun 2005 12:03:46 +0000 (12:03 +0000)
committersimonmar <unknown>
Wed, 15 Jun 2005 12:03:46 +0000 (12:03 +0000)
commite6de067858737daac62fe9066f6bda308c5616c3
tree485fa63f355450f3a5b0d89632a5296f1b3430d2
parent3fad64f3328778032439a87ec2108cdeea370552
[project @ 2005-06-15 12:03:19 by simonmar]
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.
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/main/GHC.hs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/PprTyThing.hs [new file with mode: 0644]
ghc/compiler/nativeGen/RegisterAlloc.hs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/types/Class.lhs
ghc/compiler/types/InstEnv.lhs