-
Simon Marlow authored
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.
e6de0678