HsDumpAst

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

HsDumpAst

Contents

- Dumping ASTs

Description

Contains a debug function to dump parts of the hsSyn AST. It uses a syb traversal which falls back to displaying based on the constructor name, so can be used to dump anything having a `Data.Data` instance.

Synopsis

- showAstData :: Data a => BlankSrcSpan -> a -> SDoc
- data BlankSrcSpan
  - = BlankSrcSpan
  - | NoBlankSrcSpan

# Dumping ASTs

showAstData :: Data a => BlankSrcSpan -> a -> SDoc #

Show a GHC syntax tree. This parameterised because it is also used for comparing ASTs in ppr roundtripping tests, where the SrcSpan's are blanked out, to avoid comparing locations, only structure

data BlankSrcSpan #

Constructors

BlankSrcSpan |
NoBlankSrcSpan |

Instances

Eq BlankSrcSpan # |
Instance details Defined in HsDumpAst Methods (==) :: BlankSrcSpan -> BlankSrcSpan -> Bool # (/=) :: BlankSrcSpan -> BlankSrcSpan -> Bool #
Show BlankSrcSpan # |
Instance details Defined in HsDumpAst Methods showsPrec :: Int -> BlankSrcSpan -> ShowS Source # show :: BlankSrcSpan -> String Source # showList :: [BlankSrcSpan] -> ShowS Source #