| haskell-src-exts-1.9.0: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer | Source code | Contents | Index
Language.Haskell.Exts.Annotated.Simplify |
Portability | portable
Stability | experimental
Maintainer | Niklas 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. A function `sXYZ` translates an annotated AST node of type `XYZ l` into a simple AST node of type `XYZ`. I would have prefered to use a MPTC with an fd/type family to get a single exported function name, but I wish to stay Haskell 2010 compliant. Let's hope for Haskell 2011.
Synopsis
sModule :: SrcInfo loc => Module loc -> Module
sDecl :: SrcInfo loc => Decl loc -> Decl
sAnnotation :: SrcInfo loc => Annotation loc -> Annotation
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])
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])
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
sModulePragma :: SrcInfo loc => ModulePragma loc -> ModulePragma
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
sModule :: SrcInfo loc => Module loc -> Module | Source
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 -> Decl | Source
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 `SrcLoc`s.
sAnnotation :: SrcInfo loc => Annotation loc -> Annotation | Source
sModuleName :: ModuleName l -> ModuleName | Source
sSpecialCon :: SpecialCon l -> SpecialCon | Source
sQName :: QName l -> QName | Source
sName :: Name l -> Name | Source
sIPName :: IPName l -> IPName | Source
sQOp :: QOp l -> QOp | Source
sOp :: Op l -> Op | Source
sCName :: CName l -> CName | Source
sModuleHead :: Maybe (ModuleHead l) -> (ModuleName, Maybe WarningText, Maybe [ExportSpec]) | Source
sExportSpecList :: ExportSpecList l -> [ExportSpec] | Source
sExportSpec :: ExportSpec l -> ExportSpec | Source
sImportDecl :: SrcInfo loc => ImportDecl loc -> ImportDecl | Source
sImportSpecList :: ImportSpecList l -> (Bool, [ImportSpec]) | Source
sImportSpec :: ImportSpec l -> ImportSpec | Source
sAssoc :: Assoc l -> Assoc | Source
sDeclHead :: DeclHead l -> (Name, [TyVarBind]) | Source
sInstHead :: InstHead l -> (QName, [Type]) | Source
sDataOrNew :: DataOrNew l -> DataOrNew | Source
sDeriving :: Deriving l -> [(QName, [Type])] | Source
sBinds :: SrcInfo loc => Binds loc -> Binds | Source
sIPBind :: SrcInfo loc => IPBind loc -> IPBind | Source
sMatch :: SrcInfo loc => Match loc -> Match | Source
sQualConDecl :: SrcInfo loc => QualConDecl loc -> QualConDecl | Source
sConDecl :: ConDecl l -> ConDecl | Source
sFieldDecl :: FieldDecl l -> ([Name], BangType) | Source
sGadtDecl :: SrcInfo loc => GadtDecl loc -> GadtDecl | Source
sClassDecl :: SrcInfo loc => ClassDecl loc -> ClassDecl | Source
sInstDecl :: SrcInfo loc => InstDecl loc -> InstDecl | Source
sBangType :: BangType l -> BangType | Source
sRhs :: SrcInfo loc => Rhs loc -> Rhs | Source
sGuardedRhs :: SrcInfo loc => GuardedRhs loc -> GuardedRhs | Source
sType :: Type l -> Type | Source
sTyVarBind :: TyVarBind l -> TyVarBind | Source
sKind :: Kind l -> Kind | Source
sFunDep :: FunDep l -> FunDep | Source
sContext :: Context l -> Context | Source
sAsst :: Asst l -> Asst | Source
sLiteral :: Literal l -> Literal | Source
sExp :: SrcInfo loc => Exp loc -> Exp | Source
sXName :: XName l -> XName | Source
sXAttr :: SrcInfo loc => XAttr loc -> XAttr | Source
sBracket :: SrcInfo loc => Bracket loc -> Bracket | Source
sSplice :: SrcInfo loc => Splice loc -> Splice | Source
sSafety :: Safety l -> Safety | Source
sCallConv :: CallConv l -> CallConv | Source
sModulePragma :: SrcInfo loc => ModulePragma loc -> ModulePragma | Source
sActivation :: Activation l -> Activation | Source
sRule :: SrcInfo loc => Rule loc -> Rule | Source
sRuleVar :: RuleVar l -> RuleVar | Source
sWarningText :: WarningText l -> WarningText | Source
sPat :: SrcInfo loc => Pat loc -> Pat | Source
sPXAttr :: SrcInfo loc => PXAttr loc -> PXAttr | Source
sRPatOp :: RPatOp l -> RPatOp | Source
sRPat :: SrcInfo loc => RPat loc -> RPat | Source
sPatField :: SrcInfo loc => PatField loc -> PatField | Source
sStmt :: SrcInfo loc => Stmt loc -> Stmt | Source
sQualStmt :: SrcInfo loc => QualStmt loc -> QualStmt | Source
sFieldUpdate :: SrcInfo loc => FieldUpdate loc -> FieldUpdate | Source
sAlt :: SrcInfo loc => Alt loc -> Alt | Source
sGuardedAlts :: SrcInfo loc => GuardedAlts loc -> GuardedAlts | Source
sGuardedAlt :: SrcInfo loc => GuardedAlt loc -> GuardedAlt | Source
Produced by Haddock version 2.4.2