Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC.Hs.Dump
Contents
Description
Contains a debug function to dump parts of the GHC.Hs 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 -> BlankEpAnnotations -> a -> SDoc
- showAstDataFull :: Data a => a -> SDoc
- data BlankSrcSpan
- data BlankEpAnnotations
Dumping ASTs
showAstData :: Data a => BlankSrcSpan -> BlankEpAnnotations -> a -> SDoc Source #
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
showAstDataFull :: Data a => a -> SDoc Source #
Show the full AST as the compiler sees it.
data BlankSrcSpan Source #
Should source spans be removed from output.
Constructors
BlankSrcSpan | |
BlankSrcSpanFile | |
NoBlankSrcSpan |
Instances
Show BlankSrcSpan Source # | |
Defined in GHC.Hs.Dump | |
Eq BlankSrcSpan Source # | |
Defined in GHC.Hs.Dump |
data BlankEpAnnotations Source #
Should EpAnnotations be removed from output.
Constructors
BlankEpAnnotations | |
NoBlankEpAnnotations |
Instances
Show BlankEpAnnotations Source # | |
Defined in GHC.Hs.Dump | |
Eq BlankEpAnnotations Source # | |
Defined in GHC.Hs.Dump Methods (==) :: BlankEpAnnotations -> BlankEpAnnotations -> Bool # (/=) :: BlankEpAnnotations -> BlankEpAnnotations -> Bool # |