haskell-src-exts-1.3.3: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

Portabilityportable
Stabilityexperimental
MaintainerNiklas Broberg, d00nibro@chalmers.se

Language.Haskell.Exts.Annotated.Simplify

Description

This module contains code for translating from the annotated complex AST in Language.Haskell.Exts.Annotated.Syntax to the simpler, sparsely annotated AST in Language.Haskell.Exts.Syntax.

Synopsis

Documentation

sOp :: Op l -> OpSource

sModule :: SrcInfo loc => Module loc -> ModuleSource

Translate an annotated AST node representing a Haskell module, into a simpler version that retains (almost) only abstract information. In particular, XML and hybrid XML pages enabled by the XmlSyntax extension are translated into standard Haskell modules with a page function.

sDecl :: SrcInfo loc => Decl loc -> DeclSource

Translate an annotated AST node representing a Haskell declaration into a simpler version. Note that in the simpler version, all declaration nodes are still annotated by SrcLocs.

sBinds :: SrcInfo loc => Binds loc -> BindsSource

sMatch :: SrcInfo loc => Match loc -> MatchSource

sRhs :: SrcInfo loc => Rhs loc -> RhsSource

sType :: Type l -> TypeSource

Translate an annotated AST node representing a Haskell type into a simpler unannotated form.

sExp :: SrcInfo loc => Exp loc -> ExpSource

Translate an annotated AST node representing a Haskell expression into a simpler unannotated form.

sXAttr :: SrcInfo loc => XAttr loc -> XAttrSource

sOptionPragma :: SrcInfo loc => OptionPragma loc -> OptionPragmaSource

Translate an annotated AST node representing a top-level Options pragma into a simpler unannotated form.

sRule :: SrcInfo loc => Rule loc -> RuleSource

sPat :: SrcInfo loc => Pat loc -> PatSource

Translate an annotated AST node representing a Haskell pattern into a simpler unannotated form.

sRPat :: SrcInfo loc => RPat loc -> RPatSource

sStmt :: SrcInfo loc => Stmt loc -> StmtSource

sAlt :: SrcInfo loc => Alt loc -> AltSource