Safe Haskell | None |
---|---|
Language | Haskell2010 |
A custom AST representation for Haskell tools. Different layers of the AST are recursive, to separate them into modules we introduced source imports.
- module Language.Haskell.Tools.AST.References
- module Language.Haskell.Tools.AST.Helpers
- data UModule dom stage = UModule {
- _filePragmas :: AnnListG UFilePragma dom stage
- _modHead :: AnnMaybeG UModuleHead dom stage
- _modImports :: AnnListG UImportDecl dom stage
- _modDecl :: AnnListG UDecl dom stage
- data UModuleHead dom stage = UModuleHead {
- _mhName :: Ann UModuleName dom stage
- _mhPragma :: AnnMaybeG UModulePragma dom stage
- _mhExports :: AnnMaybeG UExportSpecs dom stage
- data UExportSpecs dom stage = UExportSpecs {
- _espExports :: AnnListG UExportSpec dom stage
- data UExportSpec dom stage
- = UDeclExport {
- _exportDecl :: Ann UIESpec dom stage
- | UModuleExport {
- _exportModuleName :: Ann UModuleName dom stage
- = UDeclExport {
- data UIESpec dom stage = UIESpec {
- _ieModifier :: AnnMaybeG UImportModifier dom stage
- _ieName :: Ann UName dom stage
- _ieSubspec :: AnnMaybeG USubSpec dom stage
- data UImportModifier dom stage
- data USubSpec dom stage
- = USubSpecAll
- | USubSpecList { }
- data UFilePragma dom stage
- = ULanguagePragma {
- _lpPragmas :: AnnListG ULanguageExtension dom stage
- | UOptionsPragma {
- _opStr :: Ann UStringNode dom stage
- = ULanguagePragma {
- data UModulePragma dom stage
- = UModuleWarningPragma {
- _modWarningStr :: AnnListG UStringNode dom stage
- | UModuleDeprecatedPragma {
- _modDeprecatedPragma :: AnnListG UStringNode dom stage
- = UModuleWarningPragma {
- data ULanguageExtension dom stage = ULanguageExtension {}
- data UImportDecl dom stage = UImportDecl {
- _importSource :: AnnMaybeG UImportSource dom stage
- _importQualified :: AnnMaybeG UImportQualified dom stage
- _importSafe :: AnnMaybeG UImportSafe dom stage
- _importPkg :: AnnMaybeG UStringNode dom stage
- _importModule :: Ann UModuleName dom stage
- _importAs :: AnnMaybeG UImportRenaming dom stage
- _importSpec :: AnnMaybeG UImportSpec dom stage
- data UImportSpec dom stage
- = UImportSpecList {
- _importSpecList :: AnnListG UIESpec dom stage
- | UImportSpecHiding {
- _importSpecHiding :: AnnListG UIESpec dom stage
- = UImportSpecList {
- data UImportQualified dom stage = UImportQualified
- data UImportSource dom stage = UImportSource
- data UImportSafe dom stage = UImportSafe
- data UTypeNamespace dom stage = UTypeNamespace
- data UImportRenaming dom stage = UImportRenaming {
- _importRename :: Ann UModuleName dom stage
- data UModuleName dom stage = UModuleName {}
- data TypeKeyword dom stage = TypeKeyword
- data USplice dom stage
- = UIdSplice { }
- | UParenSplice {
- _spliceExpr :: Ann UExpr dom stage
- data UQuasiQuote dom stage = UQuasiQuote {
- _qqExprName :: Ann UName dom stage
- _qqExprBody :: Ann QQString dom stage
- data QQString dom stage = QQString {}
- data UBracket dom stage
- = UExprBracket {
- _bracketExpr :: Ann UExpr dom stage
- | UPatternBracket {
- _bracketPattern :: Ann UPattern dom stage
- | UTypeBracket {
- _bracketType :: Ann UType dom stage
- | UDeclsBracket {
- _bracketDecl :: AnnListG UDecl dom stage
- = UExprBracket {
- data UDecl dom stage
- = UTypeDecl { }
- | UTypeFamilyDecl {
- _declTypeFamily :: Ann UTypeFamily dom stage
- | UClosedTypeFamilyDecl { }
- | UDataDecl {
- _declNewtype :: Ann UDataOrNewtypeKeyword dom stage
- _declCtx :: AnnMaybeG UContext dom stage
- _declHead :: Ann UDeclHead dom stage
- _declCons :: AnnListG UConDecl dom stage
- _declDeriving :: AnnListG UDeriving dom stage
- | UGDataDecl {
- _declNewtype :: Ann UDataOrNewtypeKeyword dom stage
- _declCtx :: AnnMaybeG UContext dom stage
- _declHead :: Ann UDeclHead dom stage
- _declKind :: AnnMaybeG UKindConstraint dom stage
- _declGadt :: AnnListG UGadtConDecl dom stage
- _declDeriving :: AnnListG UDeriving dom stage
- | UTypeInstDecl {
- _declInstance :: Ann UInstanceRule dom stage
- _declAssignedType :: Ann UType dom stage
- | UDataInstDecl {
- _declNewtype :: Ann UDataOrNewtypeKeyword dom stage
- _declInstance :: Ann UInstanceRule dom stage
- _declCons :: AnnListG UConDecl dom stage
- _declDeriving :: AnnListG UDeriving dom stage
- | UGDataInstDecl {
- _declNewtype :: Ann UDataOrNewtypeKeyword dom stage
- _declInstance :: Ann UInstanceRule dom stage
- _declKind :: AnnMaybeG UKindConstraint dom stage
- _declGadt :: AnnListG UGadtConDecl dom stage
- | UClassDecl { }
- | UInstDecl {
- _declOverlap :: AnnMaybeG UOverlapPragma dom stage
- _declInstRule :: Ann UInstanceRule dom stage
- _declInstDecl :: AnnMaybeG UInstBody dom stage
- | UPatternSynonymDecl {
- _declPatSyn :: Ann UPatternSynonym dom stage
- | UDerivDecl {
- _declDerivStrat :: AnnMaybeG UDeriveStrategy dom stage
- _declOverlap :: AnnMaybeG UOverlapPragma dom stage
- _declInstRule :: Ann UInstanceRule dom stage
- | UFixityDecl {
- _declFixity :: Ann UFixitySignature dom stage
- | UDefaultDecl {
- _declTypes :: AnnListG UType dom stage
- | UTypeSigDecl {
- _declTypeSig :: Ann UTypeSignature dom stage
- | UPatTypeSigDecl {
- _declPatTypeSig :: Ann UPatternTypeSignature dom stage
- | UValueBinding {
- _declValBind :: Ann UValueBind dom stage
- | UForeignImport {
- _declCallConv :: Ann UCallConv dom stage
- _declSafety :: AnnMaybeG USafety dom stage
- _declName :: Ann UName dom stage
- _declForeignType :: Ann UType dom stage
- | UForeignExport {
- _declCallConv :: Ann UCallConv dom stage
- _declName :: Ann UName dom stage
- _declForeignType :: Ann UType dom stage
- | UPragmaDecl {
- _declPragma :: Ann UTopLevelPragma dom stage
- | URoleDecl {
- _declRoleType :: Ann UQualifiedName dom stage
- _declRoles :: AnnListG URole dom stage
- | USpliceDecl {
- _declSplice :: Ann USplice dom stage
- data UDeclHead dom stage
- data UClassBody dom stage = UClassBody {
- _cbElements :: AnnListG UClassElement dom stage
- data UClassElement dom stage
- = UClsSig {
- _ceTypeSig :: Ann UTypeSignature dom stage
- | UClsFixity {
- _clsFixity :: Ann UFixitySignature dom stage
- | UClsDef {
- _ceBind :: Ann UValueBind dom stage
- | UClsTypeFam {
- _ceTypeFam :: Ann UTypeFamily dom stage
- | UClsTypeDef { }
- | UClsDefSig { }
- | UClsMinimal {
- _pragmaFormula :: Ann UMinimalFormula dom stage
- | UClsInline {
- _clsInline :: Ann UInlinePragma dom stage
- = UClsSig {
- data UInstanceRule dom stage = UInstanceRule {}
- data UInstanceHead dom stage
- = UInstanceHeadCon {
- _ihConName :: Ann UName dom stage
- | UInstanceHeadInfix { }
- | UInstanceHeadParen {
- _ihHead :: Ann UInstanceHead dom stage
- | UInstanceHeadApp { }
- = UInstanceHeadCon {
- data UInstBody dom stage = UInstBody {
- _instBodyDecls :: AnnListG UInstBodyDecl dom stage
- data UInstBodyDecl dom stage
- = UInstBodyNormalDecl {
- _instBodyDeclFunbind :: Ann UValueBind dom stage
- | UInstBodyTypeSig {
- _instBodyTypeSig :: Ann UTypeSignature dom stage
- | UInstBodyTypeDecl {
- _instBodyTypeEqn :: Ann UTypeEqn dom stage
- | UInstBodyDataDecl {
- _instBodyDataNew :: Ann UDataOrNewtypeKeyword dom stage
- _instBodyLhsType :: Ann UInstanceRule dom stage
- _instBodyDataCons :: AnnListG UConDecl dom stage
- _instBodyDerivings :: AnnListG UDeriving dom stage
- | UInstBodyGadtDataDecl {
- _instBodyDataNew :: Ann UDataOrNewtypeKeyword dom stage
- _instBodyLhsType :: Ann UInstanceRule dom stage
- _instBodyDataKind :: AnnMaybeG UKindConstraint dom stage
- _instBodyGadtCons :: AnnListG UGadtConDecl dom stage
- _instBodyDerivings :: AnnListG UDeriving dom stage
- | USpecializeInstance {
- _specializeInstanceType :: Ann UType dom stage
- | UInlineInstance {
- _instanceInline :: Ann UInlinePragma dom stage
- | UInstanceSpecialize {
- _specializeInstance :: Ann USpecializePragma dom stage
- = UInstBodyNormalDecl {
- data UOverlapPragma dom stage
- data UTypeFamily dom stage
- = UTypeFamily { }
- | UDataFamily { }
- data UTypeFamilySpec dom stage
- = UTypeFamilyKind {
- _tfSpecKind :: Ann UKindConstraint dom stage
- | UTypeFamilyTyVar {
- _tfTypeVar :: Ann UTyVar dom stage
- | UTypeFamilyInjectivity {
- _tfInjectivity :: Ann UInjectivityAnn dom stage
- = UTypeFamilyKind {
- data UInjectivityAnn dom stage = UInjectivityAnn {
- _injAnnRes :: Ann UTyVar dom stage
- _injAnnDeps :: AnnListG UName dom stage
- data UTypeEqn dom stage = UTypeEqn {}
- data UGadtConDecl dom stage = UGadtConDecl {
- _gadtConNames :: AnnListG UName dom stage
- _gadtConTypeArgs :: AnnListG UTyVar dom stage
- _gadtConTypeCtx :: AnnMaybeG UContext dom stage
- _gadtConType :: Ann UGadtConType dom stage
- data UDataOrNewtypeKeyword dom stage
- data UGadtConType dom stage
- = UGadtNormalType {
- _gadtConNormalType :: Ann UType dom stage
- | UGadtRecordType {
- _gadtConRecordFields :: AnnListG UFieldDecl dom stage
- _gadtConResultType :: Ann UType dom stage
- = UGadtNormalType {
- data UFunDeps dom stage = UFunDeps {}
- data UFunDep dom stage = UFunDep {
- _funDepLhs :: AnnListG UName dom stage
- _funDepRhs :: AnnListG UName dom stage
- data UConDecl dom stage
- = UConDecl {
- _conTypeArgs :: AnnListG UTyVar dom stage
- _conTypeCtx :: AnnMaybeG UContext dom stage
- _conDeclName :: Ann UName dom stage
- _conDeclArgs :: AnnListG UType dom stage
- | URecordDecl {
- _conTypeArgs :: AnnListG UTyVar dom stage
- _conTypeCtx :: AnnMaybeG UContext dom stage
- _conDeclName :: Ann UName dom stage
- _conDeclFields :: AnnListG UFieldDecl dom stage
- | UInfixConDecl {
- _conTypeArgs :: AnnListG UTyVar dom stage
- _conTypeCtx :: AnnMaybeG UContext dom stage
- _conDeclLhs :: Ann UType dom stage
- _conDeclOp :: Ann UOperator dom stage
- _conDeclRhs :: Ann UType dom stage
- = UConDecl {
- data UFieldDecl dom stage = UFieldDecl {
- _fieldNames :: AnnListG UName dom stage
- _fieldType :: Ann UType dom stage
- data UDeriving dom stage
- = UDerivingOne {
- _deriveStrategy :: AnnMaybeG UDeriveStrategy dom stage
- _oneDerived :: Ann UInstanceHead dom stage
- | UDerivings {
- _deriveStrategy :: AnnMaybeG UDeriveStrategy dom stage
- _allDerived :: AnnListG UInstanceHead dom stage
- = UDerivingOne {
- data UDeriveStrategy dom stage
- data UPatternTypeSignature dom stage = UPatternTypeSignature {
- _patSigName :: AnnListG UName dom stage
- _patSigType :: Ann UType dom stage
- data UPatternSynonym dom stage = UPatternSynonym {
- _patLhs :: Ann UPatSynLhs dom stage
- _patRhs :: Ann UPatSynRhs dom stage
- data UPatSynLhs dom stage
- = UNormalPatSyn { }
- | UInfixPatSyn {
- _patSynLhs :: Ann UName dom stage
- _patSynOp :: Ann UOperator dom stage
- _patSynRhs :: Ann UName dom stage
- | URecordPatSyn { }
- data UPatSynRhs dom stage
- = UBidirectionalPatSyn {
- _patRhsPat :: Ann UPattern dom stage
- _patRhsOpposite :: AnnMaybeG UPatSynWhere dom stage
- | UOneDirectionalPatSyn {
- _patRhsPat :: Ann UPattern dom stage
- = UBidirectionalPatSyn {
- data UPatSynWhere dom stage = UPatSynWhere {
- _patOpposite :: AnnListG UMatch dom stage
- data UCallConv dom stage
- = UStdCall
- | UCCall
- | UCPlusPlus
- | UDotNet
- | UJvm
- | UJs
- | UJavaScript
- | UCApi
- data USafety dom stage
- data URole dom stage
- data UTopLevelPragma dom stage
- = URulePragma {
- _pragmaRule :: AnnListG URule dom stage
- | UDeprPragma {
- _pragmaObjects :: AnnListG UName dom stage
- _deprMessage :: AnnListG UStringNode dom stage
- | UWarningPragma {
- _pragmaObjects :: AnnListG UName dom stage
- _warnMessage :: AnnListG UStringNode dom stage
- | UAnnPragma {
- _annotationSubject :: Ann UAnnotationSubject dom stage
- _annotateExpr :: Ann UExpr dom stage
- | UInlinePragmaDecl {
- _pragmaInline :: Ann UInlinePragma dom stage
- | ULinePragma {
- _pragmaLineNum :: Ann LineNumber dom stage
- _pragmaFileName :: AnnMaybeG UStringNode dom stage
- | USpecializeDecl {
- _specializePragma :: Ann USpecializePragma dom stage
- | UCompletePragma {
- _pragmaObjects :: AnnListG UName dom stage
- _pragmaSignature :: AnnMaybeG UName dom stage
- = URulePragma {
- data USpecializePragma dom stage = USpecializePragma {
- _pragmaPhase :: AnnMaybeG UPhaseControl dom stage
- _specializeDef :: Ann UName dom stage
- _specializeType :: AnnListG UType dom stage
- data URule dom stage = URule {
- _ruleName :: Ann UStringNode dom stage
- _rulePhase :: AnnMaybeG UPhaseControl dom stage
- _ruleBounded :: AnnListG URuleVar dom stage
- _ruleLhs :: Ann UExpr dom stage
- _ruleRhs :: Ann UExpr dom stage
- data URuleVar dom stage
- = URuleVar {
- _ruleVarName :: Ann UName dom stage
- | USigRuleVar {
- _ruleVarName :: Ann UName dom stage
- _ruleVarType :: Ann UType dom stage
- = URuleVar {
- data UAnnotationSubject dom stage
- = UNameAnnotation {
- _annotateName :: Ann UName dom stage
- | UTypeAnnotation {
- _annotateName :: Ann UName dom stage
- | UModuleAnnotation
- = UNameAnnotation {
- data UMinimalFormula dom stage
- = UMinimalName {
- _minimalName :: Ann UName dom stage
- | UMinimalParen {
- _minimalInner :: Ann UMinimalFormula dom stage
- | UMinimalOr {
- _minimalOrs :: AnnListG UMinimalFormula dom stage
- | UMinimalAnd {
- _minimalAnds :: AnnListG UMinimalFormula dom stage
- = UMinimalName {
- data LineNumber dom stage = LineNumber {
- _lineNumber :: Int
- data UValueBind dom stage
- = USimpleBind {
- _valBindPat :: Ann UPattern dom stage
- _valBindRhs :: Ann URhs dom stage
- _valBindLocals :: AnnMaybeG ULocalBinds dom stage
- | UFunBind {
- _funBindMatches :: AnnListG UMatch dom stage
- = USimpleBind {
- data UMatch dom stage = UMatch {
- _matchLhs :: Ann UMatchLhs dom stage
- _matchRhs :: Ann URhs dom stage
- _matchBinds :: AnnMaybeG ULocalBinds dom stage
- data UMatchLhs dom stage
- = UNormalLhs {
- _matchLhsName :: Ann UName dom stage
- _matchLhsArgs :: AnnListG UPattern dom stage
- | UInfixLhs {
- _matchLhsLhs :: Ann UPattern dom stage
- _matchLhsOperator :: Ann UOperator dom stage
- _matchLhsRhs :: Ann UPattern dom stage
- _matchLhsArgs :: AnnListG UPattern dom stage
- = UNormalLhs {
- data ULocalBinds dom stage = ULocalBinds {
- _localBinds :: AnnListG ULocalBind dom stage
- data ULocalBind dom stage
- = ULocalValBind {
- _localVal :: Ann UValueBind dom stage
- | ULocalSignature {
- _localSig :: Ann UTypeSignature dom stage
- | ULocalFixity {
- _localFixity :: Ann UFixitySignature dom stage
- | ULocalInline {
- _localInline :: Ann UInlinePragma dom stage
- = ULocalValBind {
- data UTypeSignature dom stage = UTypeSignature {}
- data UFixitySignature dom stage = UFixitySignature {
- _fixityAssoc :: Ann Assoc dom stage
- _fixityPrecedence :: AnnMaybeG Precedence dom stage
- _fixityOperators :: AnnListG UOperator dom stage
- data Assoc dom stage
- data Precedence dom stage = Precedence {}
- data URhs dom stage
- = UUnguardedRhs { }
- | UGuardedRhss {
- _rhsGuards :: AnnListG UGuardedRhs dom stage
- data UGuardedRhs dom stage = UGuardedRhs {
- _guardStmts :: AnnListG URhsGuard dom stage
- _guardExpr :: Ann UExpr dom stage
- data URhsGuard dom stage
- = UGuardBind { }
- | UGuardLet {
- _guardBinds :: AnnListG ULocalBind dom stage
- | UGuardCheck {
- _guardCheck :: Ann UExpr dom stage
- data UInlinePragma dom stage
- = UInlinePragma {
- _inlineConlike :: AnnMaybeG UConlikeAnnot dom stage
- _inlinePhase :: AnnMaybeG UPhaseControl dom stage
- _inlineDef :: Ann UName dom stage
- | UNoInlinePragma {
- _noInlineDef :: Ann UName dom stage
- | UInlinablePragma {
- _inlinePhase :: AnnMaybeG UPhaseControl dom stage
- _inlinableDef :: Ann UName dom stage
- = UInlinePragma {
- data UConlikeAnnot dom stage = UConlikeAnnot
- data UPhaseControl dom stage = UPhaseControl {
- _phaseUntil :: AnnMaybeG PhaseInvert dom stage
- _phaseNumber :: AnnMaybeG PhaseNumber dom stage
- data PhaseNumber dom stage = PhaseNumber {}
- data PhaseInvert dom stage = PhaseInvert
- data UExpr dom stage
- = UVar { }
- | ULit { }
- | UInfixApp { }
- | UPrefixApp { }
- | UApp { }
- | ULambda {
- _exprBindings :: AnnListG UPattern dom stage
- _exprInner :: Ann UExpr dom stage
- | ULet {
- _exprFunBind :: AnnListG ULocalBind dom stage
- _exprInner :: Ann UExpr dom stage
- | UIf { }
- | UMultiIf {
- _exprIfAlts :: AnnListG UGuardedCaseRhs dom stage
- | UCase { }
- | UDo { }
- | UTuple {
- _tupleElems :: AnnListG UExpr dom stage
- | UUnboxedTuple {
- _tupleElems :: AnnListG UExpr dom stage
- | UTupleSection {
- _tupleSectionElems :: AnnListG UTupSecElem dom stage
- | UUnboxedTupSec {
- _tupleSectionElems :: AnnListG UTupSecElem dom stage
- | UList {
- _listElems :: AnnListG UExpr dom stage
- | UParArray {
- _listElems :: AnnListG UExpr dom stage
- | UParen {
- _exprInner :: Ann UExpr dom stage
- | ULeftSection { }
- | URightSection { }
- | URecCon {
- _exprRecName :: Ann UName dom stage
- _exprRecFields :: AnnListG UFieldUpdate dom stage
- | URecUpdate {
- _exprInner :: Ann UExpr dom stage
- _exprRecFields :: AnnListG UFieldUpdate dom stage
- | UEnum { }
- | UParArrayEnum { }
- | UListComp { }
- | UParArrayComp { }
- | UTypeSig { }
- | UExplTypeApp { }
- | UVarQuote {
- _quotedName :: Ann UName dom stage
- | UTypeQuote {
- _quotedName :: Ann UName dom stage
- | UBracketExpr {
- _exprBracket :: Ann UBracket dom stage
- | USplice {
- _exprSplice :: Ann USplice dom stage
- | UQuasiQuoteExpr {
- _exprQQ :: Ann UQuasiQuote dom stage
- | UExprPragma {
- _exprPragma :: Ann UExprPragma dom stage
- _innerExpr :: Ann UExpr dom stage
- | UProc { }
- | UArrowApp {
- _exprLhs :: Ann UExpr dom stage
- _arrowAppl :: Ann UArrowAppl dom stage
- _exprRhs :: Ann UExpr dom stage
- | ULamCase { }
- | UStaticPtr {
- _exprInner :: Ann UExpr dom stage
- | UUnboxedSum {
- _exprSumPlaceholdersBefore :: AnnListG UUnboxedSumPlaceHolder dom stage
- _exprInner :: Ann UExpr dom stage
- _exprSumPlaceholdersAfter :: AnnListG UUnboxedSumPlaceHolder dom stage
- | UHole
- data UFieldUpdate dom stage
- = UNormalFieldUpdate {
- _fieldName :: Ann UName dom stage
- _fieldValue :: Ann UExpr dom stage
- | UFieldPun {
- _fieldUpdateName :: Ann UName dom stage
- | UFieldWildcard {
- _fieldWildcard :: Ann UFieldWildcard dom stage
- = UNormalFieldUpdate {
- data UFieldWildcard dom stage = FldWildcard
- data UTupSecElem dom stage
- = Present {
- _tupSecExpr :: Ann UExpr dom stage
- | Missing
- = Present {
- data UAlt' expr dom stage = UAlt {
- _altPattern :: Ann UPattern dom stage
- _altRhs :: Ann (UCaseRhs' expr) dom stage
- _altBinds :: AnnMaybeG ULocalBinds dom stage
- type UAlt = UAlt' UExpr
- type UCmdAlt = UAlt' UCmd
- data UCaseRhs' expr dom stage
- = UUnguardedCaseRhs {
- _rhsCaseExpr :: Ann expr dom stage
- | UGuardedCaseRhss {
- _rhsCaseGuards :: AnnListG (UGuardedCaseRhs' expr) dom stage
- = UUnguardedCaseRhs {
- type UCaseRhs = UCaseRhs' UExpr
- type UCmdCaseRhs = UCaseRhs' UCmd
- data UGuardedCaseRhs' expr dom stage = UGuardedCaseRhs {
- _caseGuardStmts :: AnnListG URhsGuard dom stage
- _caseGuardExpr :: Ann expr dom stage
- type UGuardedCaseRhs = UGuardedCaseRhs' UExpr
- type UCmdGuardedCaseRhs = UGuardedCaseRhs' UCmd
- data UExprPragma dom stage
- = UCorePragma {
- _pragmaStr :: Ann UStringNode dom stage
- | USccPragma {
- _pragmaStr :: Ann UStringNode dom stage
- | UGeneratedPragma {
- _pragmaSrcRange :: Ann USourceRange dom stage
- = UCorePragma {
- data USourceRange dom stage = USourceRange {
- _srFileName :: Ann UStringNode dom stage
- _srFromLine :: Ann Number dom stage
- _srFromCol :: Ann Number dom stage
- _srToLine :: Ann Number dom stage
- _srToCol :: Ann Number dom stage
- data Number dom stage = Number {}
- data UCmd dom stage
- = UArrowAppCmd {
- _cmdLhs :: Ann UExpr dom stage
- _cmdArrowOp :: Ann UArrowAppl dom stage
- _cmdRhs :: Ann UExpr dom stage
- | UArrowFormCmd { }
- | UAppCmd {
- _cmdInnerCmd :: Ann UCmd dom stage
- _cmdApplied :: Ann UExpr dom stage
- | UInfixCmd {
- _cmdLeftCmd :: Ann UCmd dom stage
- _cmdOperator :: Ann UName dom stage
- _cmdRightCmd :: Ann UCmd dom stage
- | ULambdaCmd { }
- | UParenCmd { }
- | UCaseCmd { }
- | UIfCmd { }
- | ULetCmd { }
- | UDoCmd { }
- = UArrowAppCmd {
- data UArrowAppl dom stage
- data UUnboxedSumPlaceHolder dom stage = UUnboxedSumPlaceHolder
- data UStmt' expr dom stage
- = UBindStmt {
- _stmtPattern :: Ann UPattern dom stage
- _stmtExpr :: Ann expr dom stage
- | UExprStmt { }
- | ULetStmt {
- _stmtBinds :: AnnListG ULocalBind dom stage
- | URecStmt {
- _cmdStmtBinds :: AnnListG (UStmt' expr) dom stage
- = UBindStmt {
- type UStmt = UStmt' UExpr
- type UCmdStmt = UStmt' UCmd
- data UListCompBody dom stage = UListCompBody {
- _compStmts :: AnnListG UCompStmt dom stage
- data UCompStmt dom stage
- data UDoKind dom stage
- data UPattern dom stage
- = UVarPat {
- _patternName :: Ann UName dom stage
- | ULitPat {
- _patternLiteral :: Ann ULiteral dom stage
- | UInfixAppPat {
- _patternLhs :: Ann UPattern dom stage
- _patternOperator :: Ann UOperator dom stage
- _patternRhs :: Ann UPattern dom stage
- | UAppPat {
- _patternName :: Ann UName dom stage
- _patternArgs :: AnnListG UPattern dom stage
- | UTuplePat {
- _patternElems :: AnnListG UPattern dom stage
- | UUnboxTuplePat {
- _patternElems :: AnnListG UPattern dom stage
- | UListPat {
- _patternElems :: AnnListG UPattern dom stage
- | UParArrPat {
- _patternElems :: AnnListG UPattern dom stage
- | UParenPat {
- _patternInner :: Ann UPattern dom stage
- | URecPat {
- _patternName :: Ann UName dom stage
- _patternFields :: AnnListG UPatternField dom stage
- | UAsPat {
- _patternName :: Ann UName dom stage
- _patternInner :: Ann UPattern dom stage
- | UWildPat
- | UIrrefutablePat {
- _patternInner :: Ann UPattern dom stage
- | UBangPat {
- _patternInner :: Ann UPattern dom stage
- | UTypeSigPat {
- _patternInner :: Ann UPattern dom stage
- _patternType :: Ann UType dom stage
- | UViewPat {
- _patternExpr :: Ann UExpr dom stage
- _patternInner :: Ann UPattern dom stage
- | USplicePat {
- _patternSplice :: Ann USplice dom stage
- | UQuasiQuotePat {
- _patQQ :: Ann UQuasiQuote dom stage
- | UNPlusKPat {
- _patternName :: Ann UName dom stage
- _patternLit :: Ann ULiteral dom stage
- | UUnboxedSumPat {
- _patternSumPlaceholdersBefore :: AnnListG UUnboxedSumPlaceHolder dom stage
- _patternInner :: Ann UPattern dom stage
- _patternSumPlaceholdersAfter :: AnnListG UUnboxedSumPlaceHolder dom stage
- = UVarPat {
- data UPatternField dom stage
- = UNormalFieldPattern {
- _fieldPatternName :: Ann UName dom stage
- _fieldPattern :: Ann UPattern dom stage
- | UFieldPunPattern {
- _fieldPatternName :: Ann UName dom stage
- | UFieldWildcardPattern {
- _fieldPatternWildcard :: Ann UFieldWildcard dom stage
- = UNormalFieldPattern {
- data UTyVar dom stage = UTyVarDecl {
- _tyVarName :: Ann UName dom stage
- _tyVarKind :: AnnMaybeG UKindConstraint dom stage
- data UType dom stage
- = UTyForall { }
- | UTyCtx { }
- | UTyFun {
- _typeParam :: Ann UType dom stage
- _typeResult :: Ann UType dom stage
- | UTyTuple {
- _typeElements :: AnnListG UType dom stage
- | UTyUnbTuple {
- _typeElements :: AnnListG UType dom stage
- | UTyList {
- _typeElement :: Ann UType dom stage
- | UTyParArray {
- _typeElement :: Ann UType dom stage
- | UTyApp { }
- | UTyVar { }
- | UTyParen {
- _typeInner :: Ann UType dom stage
- | UTyInfix {
- _typeLeft :: Ann UType dom stage
- _typeOperator :: Ann UOperator dom stage
- _typeRight :: Ann UType dom stage
- | UTyKinded { }
- | UTyPromoted {
- _tpPromoted :: Ann (UPromoted UType) dom stage
- | UTySplice { }
- | UTyQuasiQuote {
- _typeQQ :: Ann UQuasiQuote dom stage
- | UTyBang {
- _typeInner :: Ann UType dom stage
- | UTyLazy {
- _typeInner :: Ann UType dom stage
- | UTyUnpack {
- _typeInner :: Ann UType dom stage
- | UTyNoUnpack {
- _typeInner :: Ann UType dom stage
- | UTyWildcard
- | UTyNamedWildc {
- _typeWildcardName :: Ann UName dom stage
- | UUnbSumType {
- _typeElements :: AnnListG UType dom stage
- data UContext dom stage = UContext {
- _contextAssertion :: Ann UAssertion dom stage
- data UAssertion dom stage
- = UClassAssert {
- _assertClsName :: Ann UName dom stage
- _assertTypes :: AnnListG UType dom stage
- | UInfixAssert {
- _assertLhs :: Ann UType dom stage
- _assertOp :: Ann UOperator dom stage
- _assertRhs :: Ann UType dom stage
- | UImplicitAssert {
- _assertImplVar :: Ann UName dom stage
- _assertImplType :: Ann UType dom stage
- | UTupleAssert {
- _innerAsserts :: AnnListG UAssertion dom stage
- | UWildcardAssert
- = UClassAssert {
- data UKindConstraint dom stage = UKindConstraint {
- _kindConstr :: Ann UKind dom stage
- data UKind dom stage
- = UStarKind
- | UUnboxKind
- | UFunKind { }
- | UParenKind {
- _kindParen :: Ann UKind dom stage
- | UVarKind { }
- | UAppKind {
- _kindAppFun :: Ann UKind dom stage
- _kindAppArg :: Ann UKind dom stage
- | UInfixAppKind { }
- | UListKind { }
- | UTupleKind {
- _kindElems :: AnnListG UKind dom stage
- | UPromotedKind {
- _kindPromoted :: Ann (UPromoted UKind) dom stage
- | UTypeKind { }
- data UPromoted t dom stage
- = UPromotedInt { }
- | UPromotedString { }
- | UPromotedCon {
- _promotedConName :: Ann UName dom stage
- | UPromotedList {
- _promotedElements :: AnnListG t dom stage
- | UPromotedTuple {
- _promotedElements :: AnnListG t dom stage
- | UPromotedUnit
- data ULiteral dom stage
- = UCharLit { }
- | UStringLit { }
- | UIntLit { }
- | UFracLit { }
- | UPrimIntLit { }
- | UPrimWordLit { }
- | UPrimFloatLit { }
- | UPrimDoubleLit { }
- | UPrimCharLit { }
- | UPrimStringLit { }
- data UOperator dom stage
- = UBacktickOp {
- _operatorName :: Ann UQualifiedName dom stage
- | UNormalOp {
- _operatorName :: Ann UQualifiedName dom stage
- = UBacktickOp {
- data UName dom stage
- = UParenName {
- _simpleName :: Ann UQualifiedName dom stage
- | UNormalName {
- _simpleName :: Ann UQualifiedName dom stage
- | UImplicitName {
- _simpleName :: Ann UQualifiedName dom stage
- = UParenName {
- data UQualifiedName dom stage = UQualifiedName {
- _qualifiers :: AnnListG UNamePart dom stage
- _unqualifiedName :: Ann UNamePart dom stage
- nameFromList :: AnnListG UNamePart dom stage -> UQualifiedName dom stage
- data UNamePart dom stage = UNamePart {}
- data UStringNode dom stage = UStringNode {}
- module Language.Haskell.Tools.AST.Ann
- module Language.Haskell.Tools.AST.SemaInfoClasses
Documentation
data UModule dom stage Source #
The representation of a haskell module, that is a separate compilation unit. It may or may not have a header.
UModule | |
|
HasModuleInfo dom => HasModuleInfo' (Ann UModule dom st) Source # | |
type Rep (UModule dom stage) # | |
data UModuleHead dom stage Source #
Module declaration with name and (optional) exports
UModuleHead | |
|
type Rep (UModuleHead dom stage) # | |
data UExportSpecs dom stage Source #
A list of export specifications surrounded by parentheses
UExportSpecs | |
|
type Rep (UExportSpecs dom stage) # | |
data UExportSpec dom stage Source #
Export specifier
UDeclExport | Export a name and related names |
| |
UModuleExport | The export of an imported module ( |
|
type Rep (UExportSpec dom stage) # | |
data UIESpec dom stage Source #
Marks a name to be imported or exported with related names (subspecifier)
UIESpec | |
|
data UImportModifier dom stage Source #
Specifies the imported element
UImportPattern |
|
UImportType |
|
type Rep (UImportModifier dom stage) # | |
data USubSpec dom stage Source #
Marks how related names will be imported or exported with a given name
USubSpecAll |
|
USubSpecList |
|
data UFilePragma dom stage Source #
Pragmas that must be used before defining the module
ULanguagePragma |
|
| |
UOptionsPragma |
|
|
type Rep (UFilePragma dom stage) # | |
data UModulePragma dom stage Source #
Pragmas that must be used after the module head
UModuleWarningPragma | A warning pragma attached to the module |
| |
UModuleDeprecatedPragma | A deprecated pragma attached to the module |
|
type Rep (UModulePragma dom stage) # | |
data ULanguageExtension dom stage Source #
The name of the enabled language extension, for example ( LambdaCase
)
type Rep (ULanguageExtension dom stage) # | |
data UImportDecl dom stage Source #
An import declaration: import Module.Name
UImportDecl | |
|
HasImportInfo dom => HasImportInfo' (Ann UImportDecl dom st) Source # | |
type Rep (UImportDecl dom stage) # | |
data UImportSpec dom stage Source #
Restriction on the imported names
UImportSpecList | Restrict the import definition to ONLY import the listed names |
| |
UImportSpecHiding | Restrict the import definition to DONT import the listed names |
|
type Rep (UImportSpec dom stage) # | |
data UImportQualified dom stage Source #
Marks the import as qualified: qualified
type Rep (UImportQualified dom stage) # | |
data UImportSource dom stage Source #
type Rep (UImportSource dom stage) # | |
data UImportSafe dom stage Source #
Marks the import as safe: safe
type Rep (UImportSafe dom stage) # | |
data UTypeNamespace dom stage Source #
Marks an imported name to belong to the type namespace: type
type Rep (UTypeNamespace dom stage) # | |
data UImportRenaming dom stage Source #
Renaming imports ( as A
)
UImportRenaming | |
|
type Rep (UImportRenaming dom stage) # | |
data TypeKeyword dom stage Source #
The type
keyword used to qualify that the type and not the constructor of the same name is referred
type Rep (TypeKeyword dom stage) # | |
data USplice dom stage Source #
A template haskell splice
UIdSplice | A simple name splice: |
UParenSplice | A splice with parentheses: |
|
data UQuasiQuote dom stage Source #
Template haskell quasi-quotation: [quoter|str]
UQuasiQuote | |
|
type Rep (UQuasiQuote dom stage) # | |
data UBracket dom stage Source #
Template Haskell bracket expressions
UExprBracket | Expression bracket ( |
| |
UPatternBracket | Pattern bracket ( |
| |
UTypeBracket | Type bracket ( |
| |
UDeclsBracket | Declaration bracket ( |
|
Declarations
Haskell declarationw
UTypeDecl | A type synonym ( |
UTypeFamilyDecl | A type family declaration ( |
| |
UClosedTypeFamilyDecl | A closed type family declaration |
UDataDecl | A data or newtype declaration. Empty data type declarations without where keyword are always belong to DataDecl. |
| |
UGDataDecl | A GADT-style data or newtype declaration. |
| |
UTypeInstDecl | Type family instance declaration ( |
| |
UDataInstDecl | Data instance declaration ( |
| |
UGDataInstDecl | GADT-style data instance declaration ( |
| |
UClassDecl | Type class declaration ( |
UInstDecl | Instance declaration ( |
| |
UPatternSynonymDecl | Pattern synonyms ( |
| |
UDerivDecl | Standalone deriving declaration ( |
| |
UFixityDecl | Fixity declaration ( |
| |
UDefaultDecl | Default types ( |
| |
UTypeSigDecl | Type signature declaration ( |
| |
UPatTypeSigDecl | Pattern type signature declaration ( |
| |
UValueBinding | Function or value binding ( |
| |
UForeignImport | Foreign import ( |
| |
UForeignExport | Foreign export ( |
| |
UPragmaDecl | Top-level pragmas |
| |
URoleDecl | Role annotations ( |
| |
USpliceDecl | A Template Haskell splice declaration ( |
|
Type class definitions
data UClassBody dom stage Source #
The list of declarations that can appear in a typeclass
UClassBody | |
|
type Rep (UClassBody dom stage) # | |
data UClassElement dom stage Source #
Members of a class declaration
UClsSig | Signature: |
| |
UClsFixity | Fixity signature in class: |
| |
UClsDef | Default binding: |
| |
UClsTypeFam | Declaration of an associated type synonym: |
| |
UClsTypeDef | Default choice for type synonym: |
UClsDefSig | Default signature (by using |
UClsMinimal | |
| |
UClsInline | Inline-like pragma in class definition
not supported yet (GHC 8.0.1)
| UClsPatSig { _cePatSig :: Ann UPatternTypeSignature dom stage
} -- ^ Pattern signature in a class declaration (by using |
|
type Rep (UClassElement dom stage) # | |
Type class instances
data UInstanceRule dom stage Source #
The instance declaration rule, which is, roughly, the part of the instance declaration before the where keyword.
UInstanceRule | Instance head as an instance rule ( |
type Rep (UInstanceRule dom stage) # | |
data UInstanceHead dom stage Source #
The specification of the class instance declaration
UInstanceHeadCon | Type or class name |
| |
UInstanceHeadInfix | Infix application of the type/class name to the left operand |
UInstanceHeadParen | Parenthesized instance head |
| |
UInstanceHeadApp | Application to one more type |
type Rep (UInstanceHead dom stage) # | |
data UInstBody dom stage Source #
Instance body is the implementation of the class functions ( where a x = 1; b x = 2
)
UInstBody | |
|
data UInstBodyDecl dom stage Source #
Declarations inside an instance declaration.
UInstBodyNormalDecl | A normal value binding ( |
| |
UInstBodyTypeSig | Type signature in instance definition with |
| |
UInstBodyTypeDecl | An associated type definition ( |
| |
UInstBodyDataDecl | An associated data type implementation ( |
| |
UInstBodyGadtDataDecl | An associated data type implemented using GADT style |
| |
USpecializeInstance | Specialize instance pragma (no phase selection is allowed) |
| |
UInlineInstance | Inline-like pragma in a class instance |
| |
UInstanceSpecialize | Specialize pragma not supported yet | UInstBodyPatSyn { _instBodyPatSyn :: Ann UPatternSynonym dom stage } -- ^ A pattern synonym in a class instance |
|
type Rep (UInstBodyDecl dom stage) # | |
data UOverlapPragma dom stage Source #
Overlap pragmas. Can be applied to class declarations and class instance declarations.
UEnableOverlap |
|
UDisableOverlap |
|
UOverlappable |
|
UOverlapping |
|
UOverlaps |
|
UIncoherentOverlap |
|
type Rep (UOverlapPragma dom stage) # | |
Type families
data UTypeFamily dom stage Source #
Open type and data families
UTypeFamily | Type family declaration ( |
UDataFamily | Data family declaration ( |
type Rep (UTypeFamily dom stage) # | |
data UTypeFamilySpec dom stage Source #
Type family specification with kinds specification and injectivity.
UTypeFamilyKind | Specifies the kind of a type family ( |
| |
UTypeFamilyTyVar | Specifies the kind of a type family ( |
| |
UTypeFamilyInjectivity | Specifies the injectivity of a type family ( |
|
type Rep (UTypeFamilySpec dom stage) # | |
data UInjectivityAnn dom stage Source #
Injectivity annotation for type families ( = r | r -> a
)
UInjectivityAnn | |
|
type Rep (UInjectivityAnn dom stage) # | |
Type definitions
data UGadtConDecl dom stage Source #
GADT constructor declaration ( D1 :: { val :: Int } -> T String
)
UGadtConDecl | |
|
type Rep (UGadtConDecl dom stage) # | |
data UDataOrNewtypeKeyword dom stage Source #
The data
or the newtype
keyword to define ADTs.
type Rep (UDataOrNewtypeKeyword dom stage) # | |
data UGadtConType dom stage Source #
Type of GADT constructors (can be record types: { val :: Int }
)
UGadtNormalType | |
| |
UGadtRecordType | |
|
type Rep (UGadtConType dom stage) # | |
data UFunDeps dom stage Source #
A list of functional dependencies: | a -> b, c -> d
separated by commas
data UFunDep dom stage Source #
A functional dependency, given on the form l1 ... ln -> r1 ... rn
UFunDep | |
|
data UConDecl dom stage Source #
A constructor declaration for a datatype
UConDecl | Ordinary data constructor ( |
| |
URecordDecl | Record data constructor ( |
| |
UInfixConDecl | Infix data constructor ( |
|
data UFieldDecl dom stage Source #
Field declaration ( fld :: Int
)
UFieldDecl | |
|
type Rep (UFieldDecl dom stage) # | |
data UDeriving dom stage Source #
A deriving clause following a data type declaration. ( deriving Show
or deriving (Show, Eq)
)
UDerivingOne | |
| |
UDerivings | |
|
data UDeriveStrategy dom stage Source #
type Rep (UDeriveStrategy dom stage) # | |
Pattern synonyms
data UPatternTypeSignature dom stage Source #
Pattern type signature declaration ( pattern Succ :: Int -> Int
)
UPatternTypeSignature | |
|
type Rep (UPatternTypeSignature dom stage) # | |
data UPatternSynonym dom stage Source #
Pattern synonyms: pattern Arrow t1 t2 = App "->" [t1, t2]
UPatternSynonym | |
|
type Rep (UPatternSynonym dom stage) # | |
data UPatSynLhs dom stage Source #
Left hand side of a pattern synonym
UNormalPatSyn | A left hand side with a constructor name and arguments ( |
UInfixPatSyn | An infix pattern synonym left-hand side ( |
| |
URecordPatSyn | A record-style pattern synonym left-hand side ( |
type Rep (UPatSynLhs dom stage) # | |
data UPatSynRhs dom stage Source #
Right-hand side of pattern synonym
UBidirectionalPatSyn |
|
| |
UOneDirectionalPatSyn | pattern Int <- App Int [] |
|
type Rep (UPatSynRhs dom stage) # | |
data UPatSynWhere dom stage Source #
Where clause of pattern synonym (explicit expression direction)
UPatSynWhere | |
|
type Rep (UPatSynWhere dom stage) # | |
Foreign imports
Role annotations
Role annotations for types
Pragmas
data UTopLevelPragma dom stage Source #
Top level pragmas
URulePragma | |
| |
UDeprPragma | A pragma that marks definitions as deprecated ( |
| |
UWarningPragma | A pragma that marks definitions as deprecated ( |
| |
UAnnPragma | A pragma that annotates a definition with an arbitrary value ( |
| |
UInlinePragmaDecl | |
| |
ULinePragma | A pragma for maintaining line numbers in generated sources ( |
| |
USpecializeDecl | |
| |
UCompletePragma | The COMPLETE pragma is used to inform the pattern match checker that a certain set of patterns is complete ( |
|
type Rep (UTopLevelPragma dom stage) # | |
data USpecializePragma dom stage Source #
USpecializePragma | A pragma that tells the compiler that a polymorph function should be optimized for a given type ( |
|
type Rep (USpecializePragma dom stage) # | |
A rewrite rule ( "map/map" forall f g xs. map f (map g xs) = map (f.g) xs
)
URule | |
|
data URuleVar dom stage Source #
A variable for a rewrite rule. With or without type signature.
URuleVar | A simple rule variable |
| |
USigRuleVar | A rule variable with signature |
|
data UAnnotationSubject dom stage Source #
Annotation allows you to connect an expression to any declaration.
UNameAnnotation | The definition with the given name is annotated |
| |
UTypeAnnotation | A type with the given name is annotated |
| |
UModuleAnnotation | The whole module is annotated |
type Rep (UAnnotationSubject dom stage) # | |
data UMinimalFormula dom stage Source #
Formulas of minimal annotations declaring which functions should be defined.
UMinimalName | |
| |
UMinimalParen | |
| |
UMinimalOr | One of the minimal formulas are needed ( |
| |
UMinimalAnd | Both of the minimal formulas are needed ( |
|
type Rep (UMinimalFormula dom stage) # | |
data LineNumber dom stage Source #
A line number for a line pragma.
type Rep (LineNumber dom stage) # | |
data UValueBind dom stage Source #
Value binding for top-level and local bindings
USimpleBind | Non-function binding ( |
| |
UFunBind | Function binding ( |
|
type Rep (UValueBind dom stage) # | |
data UMatch dom stage Source #
Clause of function binding
UMatch | |
|
data UMatchLhs dom stage Source #
Something on the left side of the match
UNormalLhs | A match lhs with the function name and parameter names ( |
| |
UInfixLhs | An infix match lhs for an operator ( |
|
data ULocalBinds dom stage Source #
Local bindings attached to a declaration ( where x = 42
)
ULocalBinds | |
|
type Rep (ULocalBinds dom stage) # | |
data ULocalBind dom stage Source #
Bindings that are enabled in local blocks (where or let).
ULocalValBind | A local binding for a value |
| |
ULocalSignature | A local type signature |
| |
ULocalFixity | A local fixity declaration |
| |
ULocalInline | A local inline pragma |
|
NamedElement ULocalBind Source # | |
type Rep (ULocalBind dom stage) # | |
data UTypeSignature dom stage Source #
A type signature ( f :: Int -> Int
)
type Rep (UTypeSignature dom stage) # | |
Fixities
data UFixitySignature dom stage Source #
A fixity signature ( infixl 5 +, -
).
UFixitySignature | |
|
type Rep (UFixitySignature dom stage) # | |
Associativity of an operator.
AssocNone | non-associative operator (declared with |
AssocLeft | left-associative operator (declared with |
AssocRight | right-associative operator (declared with |
data Precedence dom stage Source #
Numeric precedence of an operator
type Rep (Precedence dom stage) # | |
Right hand side of a value binding (possible with guards): ( = 3
or | x == 1 = 3; | otherwise = 4
)
UUnguardedRhs | An unguarded right-hand-side ( |
UGuardedRhss | An unguarded right-hand-side ( |
|
data UGuardedRhs dom stage Source #
A guarded right-hand side of a value binding ( | x > 3 = 2
)
UGuardedRhs | |
|
type Rep (UGuardedRhs dom stage) # | |
data URhsGuard dom stage Source #
Guards for value bindings and pattern matches ( Just v x, v 1
)
UGuardBind | A bind statement in a pattern guard ( |
UGuardLet | A let statement in a pattern guard ( |
| |
UGuardCheck | An expression to check for a pattern guard |
|
data UInlinePragma dom stage Source #
Pragmas that control how the definitions will be inlined
UInlinePragma | A pragma that marks a function for inlining to the compiler ( |
| |
UNoInlinePragma | A pragma that forbids a function from being inlined by the compiler ( |
| |
UInlinablePragma | A pragma that marks a function that it may be inlined by the compiler ( |
|
type Rep (UInlinePragma dom stage) # | |
data UConlikeAnnot dom stage Source #
A CONLIKE
modifier for an INLINE
pragma.
type Rep (UConlikeAnnot dom stage) # | |
data UPhaseControl dom stage Source #
Controls the activation of a rewrite rule ( [1]
)
UPhaseControl | |
|
type Rep (UPhaseControl dom stage) # | |
data PhaseNumber dom stage Source #
Phase number for rewrite rules
type Rep (PhaseNumber dom stage) # | |
data PhaseInvert dom stage Source #
A tilde that marks the inversion of the phase number
type Rep (PhaseInvert dom stage) # | |
Haskell expressions
UVar | A variable or a data constructor ( |
ULit | Literal expression ( |
UInfixApp | An infix operator application ( |
UPrefixApp | Prefix operator application ( |
UApp | Function application ( |
ULambda | Lambda expression ( |
| |
ULet | Local binding ( |
| |
UIf | If expression ( |
UMultiIf | Multi way if expressions with |
| |
UCase | Pattern matching expression ( |
UDo | Do-notation expressions ( |
UTuple | Tuple expression ( |
| |
UUnboxedTuple | |
| |
UTupleSection | Tuple section, enabled with |
| |
UUnboxedTupSec | Unboxed tuple section enabled with |
| |
UList | List expression: |
| |
UParArray | Parallel array expression: |
| |
UParen | Parenthesized expression: |
| |
ULeftSection | Left operator section: |
URightSection | Right operator section: |
URecCon | Record value construction: |
| |
URecUpdate | Record value update: |
| |
UEnum | Enumeration expression ( |
UParArrayEnum | Parallel array enumeration ( |
UListComp | List comprehension ( |
UParArrayComp | Parallel array comprehensions |
UTypeSig | Explicit type signature ( |
UExplTypeApp | Explicit type application ( |
UVarQuote |
|
| |
UTypeQuote |
|
| |
UBracketExpr | Template haskell bracket expression |
| |
USplice | Template haskell splice expression, for example: |
| |
UQuasiQuoteExpr | Template haskell quasi-quotation: |
| |
UExprPragma | |
| |
UProc | Arrow definition: |
UArrowApp | Arrow application: |
| |
ULamCase | Lambda case ( |
UStaticPtr | Static pointer expression ( |
| |
UUnboxedSum | |
| |
UHole | A hole in the program |
HasScopeInfo dom => HasScopeInfo' (Ann UExpr dom st) Source # | |
type Rep (UExpr dom stage) # | |
data UFieldUpdate dom stage Source #
Field update expressions
UNormalFieldUpdate | Update of a field ( |
| |
UFieldPun | Update the field to the value of the same name ( |
| |
UFieldWildcard | Update the fields of the bounded names to their values ( |
|
type Rep (UFieldUpdate dom stage) # | |
data UFieldWildcard dom stage Source #
Marker for a field wildcard. Only needed to attach semantic information in a type-safe way.
HasImplicitFieldsInfo dom => HasImplicitFieldsInfo' (Ann UFieldWildcard dom st) Source # | |
type Rep (UFieldWildcard dom stage) # | |
data UTupSecElem dom stage Source #
An element of a tuple section that can be an expression or missing (indicating a value from a parameter)
Present | An existing element in a tuple section |
| |
Missing | A missing element in a tuple section |
type Rep (UTupSecElem dom stage) # | |
data UAlt' expr dom stage Source #
Clause of case expression ( Just x -> x + 1
)
UAlt | |
|
data UCaseRhs' expr dom stage Source #
Right hand side of a match (possible with guards): ( -> 3
or | x == 1 -> 3; | otherwise -> 4
)
UUnguardedCaseRhs | Unguarded right-hand side a pattern match ( |
| |
UGuardedCaseRhss | Guarded right-hand sides of a pattern match ( |
|
type UCmdCaseRhs = UCaseRhs' UCmd Source #
data UGuardedCaseRhs' expr dom stage Source #
A guarded right-hand side of pattern matches binding ( | x > 3 -> 2
)
UGuardedCaseRhs | |
|
type Rep (UGuardedCaseRhs' expr dom stage) # | |
type UGuardedCaseRhs = UGuardedCaseRhs' UExpr Source #
data UExprPragma dom stage Source #
Pragmas that can be applied to expressions
UCorePragma | A |
| |
USccPragma | An |
| |
UGeneratedPragma | A pragma that describes if an expression was generated from a code fragment by an external tool ( |
|
type Rep (UExprPragma dom stage) # | |
data USourceRange dom stage Source #
In-AST source ranges (for generated pragmas)
USourceRange | |
|
type Rep (USourceRange dom stage) # | |
Arrows
UArrowAppCmd | An arrow application command ( |
| |
UArrowFormCmd | A form command ( |
UAppCmd | A function application command |
| |
UInfixCmd | An infix command application |
| |
ULambdaCmd | A lambda command |
UParenCmd | A parenthesized command |
UCaseCmd | A pattern match command |
UIfCmd | An if command ( |
ULetCmd | A local binding command ( |
UDoCmd | A do-notation in a command |
data UArrowAppl dom stage Source #
ULeftAppl | Left arrow application: |
URightAppl | Right arrow application: |
ULeftHighApp | Left arrow high application: |
URightHighApp | Right arrow high application: |
type Rep (UArrowAppl dom stage) # | |
data UUnboxedSumPlaceHolder dom stage Source #
type Rep (UUnboxedSumPlaceHolder dom stage) # | |
data UStmt' expr dom stage Source #
Normal monadic statements
UBindStmt | Binding statement ( |
| |
UExprStmt | Non-binding statement ( |
ULetStmt | Let statement ( |
| |
URecStmt | A recursive binding statement with ( |
|
data UListCompBody dom stage Source #
Body of a list comprehension: ( | x <- [1..10]
)
UListCompBody | |
|
type Rep (UListCompBody dom stage) # | |
data UCompStmt dom stage Source #
List comprehension statement
UCompStmt | Normal monadic statement of a list comprehension |
UThenStmt | Then statements by |
UGroupStmt | Grouping statements by |
data UPattern dom stage Source #
Representation of patterns for pattern bindings
UVarPat | Pattern name binding |
| |
ULitPat | Literal pattern |
| |
UInfixAppPat | Infix constructor application pattern ( |
| |
UAppPat | Constructor application pattern ( |
| |
UTuplePat | Tuple pattern ( |
| |
UUnboxTuplePat | |
| |
UListPat | List pattern ( |
| |
UParArrPat | Parallel array pattern ( |
| |
UParenPat | Parenthesised patterns |
| |
URecPat | Record pattern ( |
| |
UAsPat | As-pattern (explicit name binding) ( |
| |
UWildPat | Wildcard pattern: ( |
UIrrefutablePat | Irrefutable pattern ( |
| |
UBangPat | Bang pattern ( |
| |
UTypeSigPat | Pattern with explicit type signature ( |
| |
UViewPat | View pattern ( |
| |
USplicePat | Splice patterns: |
| |
UQuasiQuotePat | Quasi-quoted patterns: |
| |
UNPlusKPat | |
| |
UUnboxedSumPat | |
|
data UPatternField dom stage Source #
UNormalFieldPattern | Named field pattern ( |
| |
UFieldPunPattern | Named field pun ( |
| |
UFieldWildcardPattern | Wildcard field pattern ( |
|
type Rep (UPatternField dom stage) # | |
data UTyVar dom stage Source #
Type variable declaration
UTyVarDecl | |
|
Haskell types
UTyForall | Forall types ( |
UTyCtx | Type with a context ( |
UTyFun | Function types ( |
| |
UTyTuple | Tuple types ( |
| |
UTyUnbTuple | |
| |
UTyList | List type with special syntax ( |
| |
UTyParArray | Parallel array type ( |
| |
UTyApp | Type application ( |
UTyVar | Type variable or constructor ( |
UTyParen | Type surrounded by parentheses ( |
| |
UTyInfix | Infix type constructor ( |
| |
UTyKinded | Type with explicit kind signature ( |
UTyPromoted | |
| |
UTySplice | A Template Haskell splice type ( |
UTyQuasiQuote | A Template Haskell quasi-quote type ( |
| |
UTyBang | Strict type marked with |
| |
UTyLazy | Lazy type marked with |
| |
UTyUnpack | Strict type marked with UNPACK pragma. (Usually contains the bang mark.) |
| |
UTyNoUnpack | Strict type marked with NOUNPACK pragma. (Usually contains the bang mark.) |
| |
UTyWildcard | A wildcard type ( |
UTyNamedWildc | A named wildcard type ( |
| |
UUnbSumType | |
|
data UContext dom stage Source #
UContext | Assertions with the fat arrow ( |
|
data UAssertion dom stage Source #
A single assertion in the context
UClassAssert | Class assertion ( |
| |
UInfixAssert | Infix class assertion, also contains type equations ( |
| |
UImplicitAssert | Assertion for implicit parameter binding ( |
| |
UTupleAssert | Multiple assertions in one ( |
| |
UWildcardAssert | Wildcard assertion ( |
type Rep (UAssertion dom stage) # | |
data UKindConstraint dom stage Source #
Kind constraint ( :: * -> *
)
UKindConstraint | |
|
type Rep (UKindConstraint dom stage) # | |
Haskell kinds
UStarKind |
|
UUnboxKind |
|
UFunKind |
|
UParenKind | A parenthesised kind |
| |
UVarKind | Kind variable (using |
UAppKind | Kind application ( |
| |
UInfixAppKind | Infix kind application ( |
UListKind | A list kind ( |
UTupleKind | A tuple kind ( |
| |
UPromotedKind | A promoted kind ( |
| |
UTypeKind | A type on the kind level with |
data UPromoted t dom stage Source #
UPromotedInt | Numeric value promoted to the kind level. |
UPromotedString | String value promoted to the kind level. |
UPromotedCon | A data constructor value promoted to the kind level. |
| |
UPromotedList | A list of elements as a kind. |
| |
UPromotedTuple | A tuple of elements as a kind. |
| |
UPromotedUnit | Kind of the unit value |
data ULiteral dom stage Source #
Haskell literals
UCharLit | Character literal: |
UStringLit | String literal: |
UIntLit | Integer literal: |
UFracLit | Fractional literal: |
UPrimIntLit | Primitive integer literal (of type |
UPrimWordLit | Primitive word literal (of type |
UPrimFloatLit | Primitive float literal (of type |
UPrimDoubleLit | Primitive double literal (of type |
UPrimCharLit | Primitive character literal (of type |
UPrimStringLit | Primitive string literal (of type |
data UOperator dom stage Source #
UBacktickOp | A normal name used as an operator with backticks: |
| |
UNormalOp | A normal operator used as an operator. |
|
UParenName | Parenthesized name: |
| |
UNormalName | A normal, non-operator name. |
| |
UImplicitName | Implicit name: |
|
data UQualifiedName dom stage Source #
Possible qualified names. Contains also implicit names.
Linear implicit parameter: %x
. Non-linear implicit parameter: ?x
.
UQualifiedName | |
|
HasDefiningInfo dom => HasDefiningInfo' (Ann UQualifiedName dom st) Source # | |
HasScopeInfo dom => HasScopeInfo' (Ann UQualifiedName dom st) Source # | |
HasFixityInfo dom => HasFixityInfo' (Ann UQualifiedName dom st) Source # | |
HasIdInfo dom => HasIdInfo' (Ann UQualifiedName dom st) Source # | |
HasNameInfo dom => HasNameInfo' (Ann UQualifiedName dom st) Source # | |
type Rep (UQualifiedName dom stage) # | |
nameFromList :: AnnListG UNamePart dom stage -> UQualifiedName dom stage Source #
data UStringNode dom stage Source #
Program elements formatted as string literals (import packages, pragma texts)
type Rep (UStringNode dom stage) # | |