haskell-src-exts-1.3.5: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printerSource codeContentsIndex
Language.Haskell.Exts.Annotated.Simplify
Portabilityportable
Stabilityexperimental
MaintainerNiklas Broberg, d00nibro@chalmers.se
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
sModuleName :: ModuleName l -> ModuleName
sSpecialCon :: SpecialCon l -> SpecialCon
sQName :: QName l -> QName
sName :: Name l -> Name
sIPName :: IPName l -> IPName
sQOp :: QOp l -> QOp
sOp :: Op l -> Op
sCName :: CName l -> CName
sModuleHead :: Maybe (ModuleHead l) -> (ModuleName, Maybe WarningText, Maybe [ExportSpec])
sModule :: SrcInfo loc => Module loc -> Module
pageFun :: SrcLoc -> Exp -> Decl
sExportSpecList :: ExportSpecList l -> [ExportSpec]
sExportSpec :: ExportSpec l -> ExportSpec
sImportDecl :: SrcInfo loc => ImportDecl loc -> ImportDecl
sImportSpecList :: ImportSpecList l -> (Bool, [ImportSpec])
sImportSpec :: ImportSpec l -> ImportSpec
sAssoc :: Assoc l -> Assoc
sDeclHead :: DeclHead l -> (Name, [TyVarBind])
sInstHead :: InstHead l -> (QName, [Type])
sDecl :: SrcInfo loc => Decl loc -> Decl
sDataOrNew :: DataOrNew l -> DataOrNew
sDeriving :: Deriving l -> [(QName, [Type])]
sBinds :: SrcInfo loc => Binds loc -> Binds
sIPBind :: SrcInfo loc => IPBind loc -> IPBind
sMatch :: SrcInfo loc => Match loc -> Match
sQualConDecl :: SrcInfo loc => QualConDecl loc -> QualConDecl
sConDecl :: ConDecl l -> ConDecl
sFieldDecl :: FieldDecl l -> ([Name], BangType)
sGadtDecl :: SrcInfo loc => GadtDecl loc -> GadtDecl
sClassDecl :: SrcInfo loc => ClassDecl loc -> ClassDecl
sInstDecl :: SrcInfo loc => InstDecl loc -> InstDecl
sBangType :: BangType l -> BangType
sRhs :: SrcInfo loc => Rhs loc -> Rhs
sGuardedRhs :: SrcInfo loc => GuardedRhs loc -> GuardedRhs
sType :: Type l -> Type
sTyVarBind :: TyVarBind l -> TyVarBind
sKind :: Kind l -> Kind
sFunDep :: FunDep l -> FunDep
sContext :: Context l -> Context
sAsst :: Asst l -> Asst
sLiteral :: Literal l -> Literal
sExp :: SrcInfo loc => Exp loc -> Exp
sXName :: XName l -> XName
sXAttr :: SrcInfo loc => XAttr loc -> XAttr
sBracket :: SrcInfo loc => Bracket loc -> Bracket
sSplice :: SrcInfo loc => Splice loc -> Splice
sSafety :: Safety l -> Safety
sCallConv :: CallConv l -> CallConv
sOptionPragma :: SrcInfo loc => OptionPragma loc -> OptionPragma
sActivation :: Activation l -> Activation
sRule :: SrcInfo loc => Rule loc -> Rule
sRuleVar :: RuleVar l -> RuleVar
sWarningText :: WarningText l -> WarningText
sPat :: SrcInfo loc => Pat loc -> Pat
sPXAttr :: SrcInfo loc => PXAttr loc -> PXAttr
sRPatOp :: RPatOp l -> RPatOp
sRPat :: SrcInfo loc => RPat loc -> RPat
sPatField :: SrcInfo loc => PatField loc -> PatField
sStmt :: SrcInfo loc => Stmt loc -> Stmt
sQualStmt :: SrcInfo loc => QualStmt loc -> QualStmt
sFieldUpdate :: SrcInfo loc => FieldUpdate loc -> FieldUpdate
sAlt :: SrcInfo loc => Alt loc -> Alt
sGuardedAlts :: SrcInfo loc => GuardedAlts loc -> GuardedAlts
sGuardedAlt :: SrcInfo loc => GuardedAlt loc -> GuardedAlt
Documentation
sModuleName :: ModuleName l -> ModuleNameSource
sSpecialCon :: SpecialCon l -> SpecialConSource
sQName :: QName l -> QNameSource
sName :: Name l -> NameSource
sIPName :: IPName l -> IPNameSource
sQOp :: QOp l -> QOpSource
sOp :: Op l -> OpSource
sCName :: CName l -> CNameSource
sModuleHead :: Maybe (ModuleHead l) -> (ModuleName, Maybe WarningText, Maybe [ExportSpec])Source
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.
pageFun :: SrcLoc -> Exp -> DeclSource
sExportSpecList :: ExportSpecList l -> [ExportSpec]Source
sExportSpec :: ExportSpec l -> ExportSpecSource
sImportDecl :: SrcInfo loc => ImportDecl loc -> ImportDeclSource
sImportSpecList :: ImportSpecList l -> (Bool, [ImportSpec])Source
sImportSpec :: ImportSpec l -> ImportSpecSource
sAssoc :: Assoc l -> AssocSource
sDeclHead :: DeclHead l -> (Name, [TyVarBind])Source
sInstHead :: InstHead l -> (QName, [Type])Source
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.
sDataOrNew :: DataOrNew l -> DataOrNewSource
sDeriving :: Deriving l -> [(QName, [Type])]Source
sBinds :: SrcInfo loc => Binds loc -> BindsSource
sIPBind :: SrcInfo loc => IPBind loc -> IPBindSource
sMatch :: SrcInfo loc => Match loc -> MatchSource
sQualConDecl :: SrcInfo loc => QualConDecl loc -> QualConDeclSource
sConDecl :: ConDecl l -> ConDeclSource
sFieldDecl :: FieldDecl l -> ([Name], BangType)Source
sGadtDecl :: SrcInfo loc => GadtDecl loc -> GadtDeclSource
sClassDecl :: SrcInfo loc => ClassDecl loc -> ClassDeclSource
sInstDecl :: SrcInfo loc => InstDecl loc -> InstDeclSource
sBangType :: BangType l -> BangTypeSource
sRhs :: SrcInfo loc => Rhs loc -> RhsSource
sGuardedRhs :: SrcInfo loc => GuardedRhs loc -> GuardedRhsSource
sType :: Type l -> TypeSource
Translate an annotated AST node representing a Haskell type into a simpler unannotated form.
sTyVarBind :: TyVarBind l -> TyVarBindSource
sKind :: Kind l -> KindSource
sFunDep :: FunDep l -> FunDepSource
sContext :: Context l -> ContextSource
sAsst :: Asst l -> AsstSource
sLiteral :: Literal l -> LiteralSource
sExp :: SrcInfo loc => Exp loc -> ExpSource
Translate an annotated AST node representing a Haskell expression into a simpler unannotated form.
sXName :: XName l -> XNameSource
sXAttr :: SrcInfo loc => XAttr loc -> XAttrSource
sBracket :: SrcInfo loc => Bracket loc -> BracketSource
sSplice :: SrcInfo loc => Splice loc -> SpliceSource
sSafety :: Safety l -> SafetySource
sCallConv :: CallConv l -> CallConvSource
sOptionPragma :: SrcInfo loc => OptionPragma loc -> OptionPragmaSource
Translate an annotated AST node representing a top-level Options pragma into a simpler unannotated form.
sActivation :: Activation l -> ActivationSource
sRule :: SrcInfo loc => Rule loc -> RuleSource
sRuleVar :: RuleVar l -> RuleVarSource
sWarningText :: WarningText l -> WarningTextSource
sPat :: SrcInfo loc => Pat loc -> PatSource
Translate an annotated AST node representing a Haskell pattern into a simpler unannotated form.
sPXAttr :: SrcInfo loc => PXAttr loc -> PXAttrSource
sRPatOp :: RPatOp l -> RPatOpSource
sRPat :: SrcInfo loc => RPat loc -> RPatSource
sPatField :: SrcInfo loc => PatField loc -> PatFieldSource
sStmt :: SrcInfo loc => Stmt loc -> StmtSource
sQualStmt :: SrcInfo loc => QualStmt loc -> QualStmtSource
sFieldUpdate :: SrcInfo loc => FieldUpdate loc -> FieldUpdateSource
sAlt :: SrcInfo loc => Alt loc -> AltSource
sGuardedAlts :: SrcInfo loc => GuardedAlts loc -> GuardedAltsSource
sGuardedAlt :: SrcInfo loc => GuardedAlt loc -> GuardedAltSource
Produced by Haddock version 2.6.0