haskell-tools-ast-0.1.2.1: Haskell AST for efficient tooling

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.AST

Contents

Description

A custom AST representation for Haskell tools. Different layers of the AST are recursive, to separate them into modules we introduced source imports.

Synopsis

Documentation

data Module a Source #

Instances

type Rep (Module a) Source # 
type Rep (Module a) = D1 (MetaData "Module" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Module" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_filePragmas") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FilePragma a))) (S1 (MetaSel (Just Symbol "_modHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ModuleHead a)))) ((:*:) (S1 (MetaSel (Just Symbol "_modImports") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ImportDecl a))) (S1 (MetaSel (Just Symbol "_modDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Decl a))))))

data ModuleHead a Source #

Module declaration with name and (optional) exports

Instances

type Rep (ModuleHead a) Source # 
type Rep (ModuleHead a) = D1 (MetaData "ModuleHead" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ModuleHead" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_mhName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a))) ((:*:) (S1 (MetaSel (Just Symbol "_mhExports") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ExportSpecList a))) (S1 (MetaSel (Just Symbol "_mhPragma") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ModulePragma a))))))

data ExportSpecList a Source #

A list of export specifications surrounded by parentheses

Constructors

ExportSpecList 

Instances

type Rep (ExportSpecList a) Source # 
type Rep (ExportSpecList a) = D1 (MetaData "ExportSpecList" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ExportSpecList" PrefixI True) (S1 (MetaSel (Just Symbol "_espExports") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ExportSpec a))))

data ExportSpec a Source #

Export specifier

Constructors

DeclExport

Export a name and related names

Fields

ModuleExport

The export of an imported module ( module A )

Instances

type Rep (ExportSpec a) Source # 
type Rep (ExportSpec a) = D1 (MetaData "ExportSpec" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "DeclExport" PrefixI True) (S1 (MetaSel (Just Symbol "_exportDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann IESpec a)))) (C1 (MetaCons "ModuleExport" PrefixI True) (S1 (MetaSel (Just Symbol "_exportModuleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a)))))

data IESpec a Source #

Marks a name to be imported or exported with related names (subspecifier)

Constructors

IESpec 

Instances

type Rep (IESpec a) Source # 
type Rep (IESpec a) = D1 (MetaData "IESpec" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "IESpec" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ieName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_ieSubspec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe SubSpec a)))))

data SubSpec a Source #

Marks how related names will be imported or exported with a given name

Constructors

SubSpecAll 
SubSpecList 

Fields

Instances

type Rep (SubSpec a) Source # 
type Rep (SubSpec a) = D1 (MetaData "SubSpec" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "SubSpecAll" PrefixI False) U1) (C1 (MetaCons "SubSpecList" PrefixI True) (S1 (MetaSel (Just Symbol "_essList") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a)))))

data FilePragma a Source #

Pragmas that must be used before defining the module

Constructors

LanguagePragma

LANGUAGE pragma

OptionsPragma

OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC

Fields

Instances

type Rep (FilePragma a) Source # 
type Rep (FilePragma a) = D1 (MetaData "FilePragma" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "LanguagePragma" PrefixI True) (S1 (MetaSel (Just Symbol "_lpPragmas") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LanguageExtension a)))) (C1 (MetaCons "OptionsPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_opStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a)))))

data ModulePragma a Source #

Pragmas that must be used after the module head

Constructors

ModuleWarningPragma

a warning pragma attached to the module

ModuleDeprecatedPragma

a deprecated pragma attached to the module

Instances

type Rep (ModulePragma a) Source # 
type Rep (ModulePragma a) = D1 (MetaData "ModulePragma" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "ModuleWarningPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_modWarningStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList StringNode a)))) (C1 (MetaCons "ModuleDeprecatedPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_modDeprecatedPragma") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList StringNode a)))))

data LanguageExtension a Source #

Constructors

LanguageExtension 

Fields

Instances

type Rep (LanguageExtension a) Source # 
type Rep (LanguageExtension a) = D1 (MetaData "LanguageExtension" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "LanguageExtension" PrefixI True) (S1 (MetaSel (Just Symbol "_langExt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

data ImportDecl a Source #

An import declaration: import Module.Name

data ImportSpec a Source #

Restriction on the imported names

Constructors

ImportSpecList

Restrict the import definition to ONLY import the listed names

ImportSpecHiding

Restrict the import definition to DONT import the listed names

Instances

type Rep (ImportSpec a) Source # 
type Rep (ImportSpec a) = D1 (MetaData "ImportSpec" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "ImportSpecList" PrefixI True) (S1 (MetaSel (Just Symbol "_importSpecList") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList IESpec a)))) (C1 (MetaCons "ImportSpecHiding" PrefixI True) (S1 (MetaSel (Just Symbol "_importSpecHiding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList IESpec a)))))

data ImportQualified a Source #

Marks the import as qualified: qualified

Constructors

ImportQualified 

Instances

type Rep (ImportQualified a) Source # 
type Rep (ImportQualified a) = D1 (MetaData "ImportQualified" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ImportQualified" PrefixI False) U1)

data ImportSource a Source #

Marks the import as source: {--}

Constructors

ImportSource 

Instances

type Rep (ImportSource a) Source # 
type Rep (ImportSource a) = D1 (MetaData "ImportSource" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ImportSource" PrefixI False) U1)

data ImportSafe a Source #

Marks the import as safe: safe

Constructors

ImportSafe 

Instances

type Rep (ImportSafe a) Source # 
type Rep (ImportSafe a) = D1 (MetaData "ImportSafe" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ImportSafe" PrefixI False) U1)

data TypeNamespace a Source #

Marks an imported name to belong to the type namespace: type

Constructors

TypeNamespace 

Instances

type Rep (TypeNamespace a) Source # 
type Rep (TypeNamespace a) = D1 (MetaData "TypeNamespace" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "TypeNamespace" PrefixI False) U1)

data ImportRenaming a Source #

Renaming imports ( as A )

Constructors

ImportRenaming 

Instances

type Rep (ImportRenaming a) Source # 
type Rep (ImportRenaming a) = D1 (MetaData "ImportRenaming" "Language.Haskell.Tools.AST.Modules" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ImportRenaming" PrefixI True) (S1 (MetaSel (Just Symbol "_importRename") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a))))

data Splice a Source #

A template haskell splice

Constructors

IdSplice

A simple name splice: $generateX

Fields

ParenSplice

A splice with parentheses: $(generate input)

Fields

Instances

type Rep (Splice a) Source # 
type Rep (Splice a) = D1 (MetaData "Splice" "Language.Haskell.Tools.AST.TH" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "IdSplice" PrefixI True) (S1 (MetaSel (Just Symbol "_spliceId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "ParenSplice" PrefixI True) (S1 (MetaSel (Just Symbol "_spliceExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))

data QuasiQuote a Source #

Template haskell quasi-quotation: [quoter|str]

Constructors

QuasiQuote 

Instances

type Rep (QuasiQuote a) Source # 
type Rep (QuasiQuote a) = D1 (MetaData "QuasiQuote" "Language.Haskell.Tools.AST.TH" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "QuasiQuote" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_qqExprName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_qqExprBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann QQString a)))))

data QQString a Source #

Template Haskell Quasi-quotation content

Constructors

QQString 

Fields

Instances

type Rep (QQString a) Source # 
type Rep (QQString a) = D1 (MetaData "QQString" "Language.Haskell.Tools.AST.TH" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "QQString" PrefixI True) (S1 (MetaSel (Just Symbol "_qqString") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

data Bracket a Source #

Template Haskell bracket expressions

Constructors

ExprBracket

Expression bracket ( [| x + y |] )

Fields

PatternBracket

Pattern bracket ( [| Point x y |] )

TypeBracket

Pattern bracket ( [| (Int,Int) |] )

Fields

DeclsBracket

Declaration bracket ( [| _f :: Int -> Int; f x = x*x |] )

Instances

type Rep (Bracket a) Source # 
type Rep (Bracket a) = D1 (MetaData "Bracket" "Language.Haskell.Tools.AST.TH" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "ExprBracket" PrefixI True) (S1 (MetaSel (Just Symbol "_bracketExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))) (C1 (MetaCons "PatternBracket" PrefixI True) (S1 (MetaSel (Just Symbol "_bracketPattern") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))))) ((:+:) (C1 (MetaCons "TypeBracket" PrefixI True) (S1 (MetaSel (Just Symbol "_bracketType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "DeclsBracket" PrefixI True) (S1 (MetaSel (Just Symbol "_bracketDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Decl a))))))

data Decl a Source #

Haskell declaration

Constructors

TypeDecl

A type synonym ( type String = [Char] )

Fields

TypeFamilyDecl 
ClosedTypeFamilyDecl

A closed type family declaration

DataDecl

A data or newtype declaration. Empty data type declarations without where keyword are always belong to DataDecl.

GDataDecl

A data or newtype declaration.

TypeInstDecl

Type instance declaration ( type instance Fam T = AssignedT )

DataInstDecl

Data instance declaration ( data instance Fam T = Con1 | Con2 )

GDataInstDecl

Gadt style data instance declaration ( data instance Fam T where ... )

ClassDecl

Type class declaration ( class X a [where f = ...] )

InstDecl

Instance declaration ( instance X T [where f = ...] )

PatternSynonymDecl

Pattern synonyms ( pattern Arrow t1 t2 = App "->" [t1, t2] )

DerivDecl

Standalone deriving declaration ( deriving instance X T )

FixityDecl

Fixity declaration ( infixl 5 +, - )

DefaultDecl

Default types ( default (T1, T2) )

Fields

TypeSigDecl

Type signature declaration ( _f :: Int -> Int )

PatTypeSigDecl

Type signature declaration ( _f :: Int -> Int )

ValueBinding

Function binding ( f x = 12 )

ForeignImport

Foreign import ( foreign import _foo :: Int -> IO Int )

ForeignExport

foreign export ( foreign export ccall _foo :: Int -> IO Int )

PragmaDecl

top level pragmas

RoleDecl

role annotations ( type role Ptr representational )

SpliceDecl

A Template Haskell splice declaration ( $(generateDecls) )

Fields

Instances

BindingElem Decl Source # 
type Rep (Decl a) Source # 
type Rep (Decl a) = D1 (MetaData "Decl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TypeDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) (C1 (MetaCons "TypeFamilyDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypeFamily") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeFamily a))))) ((:+:) (C1 (MetaCons "ClosedTypeFamilyDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint a))) (S1 (MetaSel (Just Symbol "_declDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TypeEqn a)))))) ((:+:) (C1 (MetaCons "DataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context a)))) ((:*:) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) ((:*:) (S1 (MetaSel (Just Symbol "_declCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl a))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving a))))))) (C1 (MetaCons "GDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) ((:*:) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context a))) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint a))) ((:*:) (S1 (MetaSel (Just Symbol "_declGadt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl a))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving a)))))))))) ((:+:) ((:+:) (C1 (MetaCons "TypeInstDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a))) (S1 (MetaSel (Just Symbol "_declAssignedType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) ((:+:) (C1 (MetaCons "DataInstDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a)))) ((:*:) (S1 (MetaSel (Just Symbol "_declCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl a))) (S1 (MetaSel (Just Symbol "_declDeriving") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving a)))))) (C1 (MetaCons "GDataInstDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declNewtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) (S1 (MetaSel (Just Symbol "_declInstance") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a)))) ((:*:) (S1 (MetaSel (Just Symbol "_declKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint a))) (S1 (MetaSel (Just Symbol "_declGadt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl a)))))))) ((:+:) (C1 (MetaCons "ClassDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context a))) (S1 (MetaSel (Just Symbol "_declHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a)))) ((:*:) (S1 (MetaSel (Just Symbol "_declFunDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe FunDeps a))) (S1 (MetaSel (Just Symbol "_declBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ClassBody a)))))) ((:+:) (C1 (MetaCons "InstDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declOverlap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe OverlapPragma a))) ((:*:) (S1 (MetaSel (Just Symbol "_declInstRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a))) (S1 (MetaSel (Just Symbol "_declInstDecl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe InstBody a)))))) (C1 (MetaCons "PatternSynonymDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPatSyn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternSynonym a)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "DerivDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declOverlap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe OverlapPragma a))) (S1 (MetaSel (Just Symbol "_declInstRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a))))) (C1 (MetaCons "FixityDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declFixity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann FixitySignature a))))) ((:+:) (C1 (MetaCons "DefaultDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type a)))) ((:+:) (C1 (MetaCons "TypeSigDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature a)))) (C1 (MetaCons "PatTypeSigDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPatTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternTypeSignature a))))))) ((:+:) ((:+:) (C1 (MetaCons "ValueBinding" PrefixI True) (S1 (MetaSel (Just Symbol "_declValBind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind a)))) ((:+:) (C1 (MetaCons "ForeignImport" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_declCallConv") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann CallConv a))) (S1 (MetaSel (Just Symbol "_declSafety") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Safety a)))) ((:*:) (S1 (MetaSel (Just Symbol "_declName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))) (C1 (MetaCons "ForeignExport" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declCallConv") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann CallConv a))) ((:*:) (S1 (MetaSel (Just Symbol "_declName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_declType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))))) ((:+:) (C1 (MetaCons "PragmaDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declPragma") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TopLevelPragma a)))) ((:+:) (C1 (MetaCons "RoleDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_declRoleType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a))) (S1 (MetaSel (Just Symbol "_declRoles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Role a))))) (C1 (MetaCons "SpliceDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_declSplice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Splice a)))))))))

data TypeFamily a Source #

Open type and data families

Constructors

TypeFamily

A type family declaration ( type family A _a :: * -> * )

DataFamily

Data family declaration

Instances

type Rep (TypeFamily a) Source # 
type Rep (TypeFamily a) = D1 (MetaData "TypeFamily" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "TypeFamily" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tfHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) (S1 (MetaSel (Just Symbol "_tfSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe TypeFamilySpec a))))) (C1 (MetaCons "DataFamily" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tfHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) (S1 (MetaSel (Just Symbol "_tfKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint a))))))

data TypeFamilySpec a Source #

Instances

type Rep (TypeFamilySpec a) Source # 
type Rep (TypeFamilySpec a) = D1 (MetaData "TypeFamilySpec" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "TypeFamilyKind" PrefixI True) (S1 (MetaSel (Just Symbol "_tfSpecKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann KindConstraint a)))) (C1 (MetaCons "TypeFamilyInjectivity" PrefixI True) (S1 (MetaSel (Just Symbol "_tfInjectivity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InjectivityAnn a)))))

data InjectivityAnn a Source #

Constructors

InjectivityAnn 

Instances

type Rep (InjectivityAnn a) Source # 
type Rep (InjectivityAnn a) = D1 (MetaData "InjectivityAnn" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "InjectivityAnn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_injAnnRes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_injAnnDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a)))))

data ClassBody a Source #

The list of declarations that can appear in a typeclass

Constructors

ClassBody 

Instances

type Rep (ClassBody a) Source # 
type Rep (ClassBody a) = D1 (MetaData "ClassBody" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ClassBody" PrefixI True) (S1 (MetaSel (Just Symbol "_cbElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ClassElement a))))

data ClassElement a Source #

Members of a class declaration

Constructors

ClsSig

Signature: _f :: A -> B

ClsDef

Default binding: f x = "aaa"

Fields

ClsTypeFam

Declaration of an associated type synonym: type T _x :: *

ClsTypeDef

Default choice for type synonym: type T x = TE or type instance T x = TE

Fields

ClsDefSig

Default signature (by using DefaultSignatures): default _enum :: (Generic a, GEnum (Rep a)) => [a]

Fields

ClsMinimal

Minimal pragma: {--}

ClsPatSig

Pattern signature in a class declaration (by using PatternSynonyms)

Instances

type Rep (ClassElement a) Source # 
type Rep (ClassElement a) = D1 (MetaData "ClassElement" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "ClsSig" PrefixI True) (S1 (MetaSel (Just Symbol "_ceTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature a)))) ((:+:) (C1 (MetaCons "ClsDef" PrefixI True) (S1 (MetaSel (Just Symbol "_ceBind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind a)))) (C1 (MetaCons "ClsTypeFam" PrefixI True) (S1 (MetaSel (Just Symbol "_ceTypeFam") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeFamily a)))))) ((:+:) ((:+:) (C1 (MetaCons "ClsTypeDef" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ceHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DeclHead a))) (S1 (MetaSel (Just Symbol "_ceKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) (C1 (MetaCons "ClsDefSig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ceName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_ceType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))) ((:+:) (C1 (MetaCons "ClsMinimal" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaFormula") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann MinimalFormula a)))) (C1 (MetaCons "ClsPatSig" PrefixI True) (S1 (MetaSel (Just Symbol "_cePatSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternTypeSignature a)))))))

data DeclHead a Source #

Constructors

DeclHead

Type or class name

Fields

DHParen

Parenthesized type

Fields

DHApp

Type application

DHInfix

Infix application of the type/class name to the left operand

data InstBody a Source #

Instance body is the implementation of the class functions ( where a x = 1; b x = 2 )

Constructors

InstBody 

Instances

type Rep (InstBody a) Source # 
type Rep (InstBody a) = D1 (MetaData "InstBody" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "InstBody" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyDecls") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList InstBodyDecl a))))

data InstBodyDecl a Source #

Declarations inside an instance declaration.

Constructors

InstBodyNormalDecl

A normal declaration ( f x = 12 )

InstBodyTypeSig

Type signature in instance definition with InstanceSigs

InstBodyTypeDecl

An associated type definition ( type A X = B )

InstBodyDataDecl

An associated data type implementation ( data A X = C1 | C2 )

InstBodyGadtDataDecl

An associated data type implemented using GADT style

SpecializeInstance

Specialize instance pragma (no phase selection is allowed) not supported yet

InstBodyPatSyn

A pattern synonym in a class instance

Instances

type Rep (InstBodyDecl a) Source # 
type Rep (InstBodyDecl a) = D1 (MetaData "InstBodyDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "InstBodyNormalDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyDeclFunbind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ValueBind a)))) ((:+:) (C1 (MetaCons "InstBodyTypeSig" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyTypeSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeSignature a)))) (C1 (MetaCons "InstBodyTypeDecl" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyTypeEqn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann TypeEqn a)))))) ((:+:) ((:+:) (C1 (MetaCons "InstBodyDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataNew") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) (S1 (MetaSel (Just Symbol "_instBodyLhsType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a)))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ConDecl a))) (S1 (MetaSel (Just Symbol "_instBodyDerivings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving a)))))) (C1 (MetaCons "InstBodyGadtDataDecl" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataNew") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DataOrNewtypeKeyword a))) (S1 (MetaSel (Just Symbol "_instBodyLhsType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a)))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyDataKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Kind a))) ((:*:) (S1 (MetaSel (Just Symbol "_instBodyGadtCons") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GadtConDecl a))) (S1 (MetaSel (Just Symbol "_instBodyDerivings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Deriving a)))))))) ((:+:) (C1 (MetaCons "SpecializeInstance" PrefixI True) (S1 (MetaSel (Just Symbol "_specializeInstanceType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "InstBodyPatSyn" PrefixI True) (S1 (MetaSel (Just Symbol "_instBodyPatSyn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatternSynonym a)))))))

data GadtConDecl a Source #

GADT constructor declaration ( _D1 :: { _val :: Int } -> T String )

Instances

type Rep (GadtConDecl a) Source # 
type Rep (GadtConDecl a) = D1 (MetaData "GadtConDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "GadtConDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gadtConNames") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_gadtConType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann GadtConType a)))))

data GadtConType a Source #

Type of GADT constructors (can be record types: { _val :: Int })

Instances

type Rep (GadtConType a) Source # 
type Rep (GadtConType a) = D1 (MetaData "GadtConType" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "GadtNormalType" PrefixI True) (S1 (MetaSel (Just Symbol "_gadtConNormalType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "GadtRecordType" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gadtConRecordFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FieldDecl a))) (S1 (MetaSel (Just Symbol "_gadtConResultType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))))

data GadtField a Source #

Constructors

GadtNormalField

Normal GADT field type ( Int )

Fields

GadtNamedField

Named GADT field ( { _val :: Int } )

Instances

type Rep (GadtField a) Source # 
type Rep (GadtField a) = D1 (MetaData "GadtField" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "GadtNormalField" PrefixI True) (S1 (MetaSel (Just Symbol "_gadtFieldType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "GadtNamedField" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gadtFieldName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_gadtFieldType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))))

data FunDeps a Source #

A list of functional dependencies: | a -> b, c -> d separated by commas

Constructors

FunDeps 

Fields

Instances

type Rep (FunDeps a) Source # 
type Rep (FunDeps a) = D1 (MetaData "FunDeps" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "FunDeps" PrefixI True) (S1 (MetaSel (Just Symbol "_funDeps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FunDep a))))

data FunDep a Source #

A functional dependency, given on the form l1 ... ln -> r1 ... rn

Constructors

FunDep 

Instances

type Rep (FunDep a) Source # 
type Rep (FunDep a) = D1 (MetaData "FunDep" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "FunDep" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_funDepLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_funDepRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a)))))

data ConDecl a Source #

Constructors

ConDecl

ordinary data constructor ( C t1 t2 )

RecordDecl

record data constructor ( C { _n1 :: t1, _n2 :: t2 } )

InfixConDecl

infix data constructor ( t1 :+: t2 )

Instances

data FieldDecl a Source #

Field declaration ( _fld :: Int )

Constructors

FieldDecl 

Instances

type Rep (FieldDecl a) Source # 
type Rep (FieldDecl a) = D1 (MetaData "FieldDecl" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "FieldDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_fieldNames") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_fieldType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))

data Deriving a Source #

A deriving clause following a data type declaration. ( deriving Show or deriving (Show, Eq) )

Instances

type Rep (Deriving a) Source # 
type Rep (Deriving a) = D1 (MetaData "Deriving" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "DerivingOne" PrefixI True) (S1 (MetaSel (Just Symbol "_oneDerived") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead a)))) (C1 (MetaCons "Derivings" PrefixI True) (S1 (MetaSel (Just Symbol "_allDerived") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList InstanceHead a)))))

data InstanceRule a Source #

The instance declaration rule, which is, roughly, the part of the instance declaration before the where keyword.

Instances

type Rep (InstanceRule a) Source # 
type Rep (InstanceRule a) = D1 (MetaData "InstanceRule" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "InstanceRule" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_irVars") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe (AnnList TyVar) a))) ((:*:) (S1 (MetaSel (Just Symbol "_irCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Context a))) (S1 (MetaSel (Just Symbol "_irHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead a)))))) (C1 (MetaCons "InstanceParen" PrefixI True) (S1 (MetaSel (Just Symbol "_irRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceRule a)))))

data InstanceHead a Source #

The specification of the class instance declaration

Constructors

InstanceHeadCon

Type or class name

Fields

InstanceHeadInfix

Infix application of the type/class name to the left operand

Fields

InstanceHeadParen

Parenthesized instance head

Fields

InstanceHeadApp

Application to one more type

Fields

Instances

type Rep (InstanceHead a) Source # 
type Rep (InstanceHead a) = D1 (MetaData "InstanceHead" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "InstanceHeadCon" PrefixI True) (S1 (MetaSel (Just Symbol "_ihConName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "InstanceHeadInfix" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ihLeftOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) (S1 (MetaSel (Just Symbol "_ihOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))))) ((:+:) (C1 (MetaCons "InstanceHeadParen" PrefixI True) (S1 (MetaSel (Just Symbol "_ihHead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead a)))) (C1 (MetaCons "InstanceHeadApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ihFun") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann InstanceHead a))) (S1 (MetaSel (Just Symbol "_ihType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))))

data TypeEqn a Source #

Type equations as found in closed type families ( T A = S )

Constructors

TypeEqn 

Fields

Instances

type Rep (TypeEqn a) Source # 
type Rep (TypeEqn a) = D1 (MetaData "TypeEqn" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "TypeEqn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_teLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) (S1 (MetaSel (Just Symbol "_teRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))

data PatternTypeSignature a Source #

A pattern type signature ( pattern p :: Int -> T )

Constructors

PatternTypeSignature 

Fields

Instances

type Rep (PatternTypeSignature a) Source # 
type Rep (PatternTypeSignature a) = D1 (MetaData "PatternTypeSignature" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PatternTypeSignature" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patSigName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_patSigType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))

data PatternSynonym a Source #

Pattern synonyms: pattern Arrow t1 t2 = App "->" [t1, t2]

Constructors

PatternSynonym 

Instances

type Rep (PatternSynonym a) Source # 
type Rep (PatternSynonym a) = D1 (MetaData "PatternSynonym" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PatternSynonym" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatSynLhs a))) (S1 (MetaSel (Just Symbol "_patRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PatSynRhs a)))))

data PatSynLhs a Source #

Left hand side of a pattern synonym

data PatSynRhs a Source #

Right-hand side of pattern synonym

Constructors

BidirectionalPatSyn

pattern Int = App Int [] or pattern Int <- App Int [] where Int = App Int []

OneDirectionalPatSyn
 pattern Int <- App Int []

Fields

Instances

type Rep (PatSynRhs a) Source # 
type Rep (PatSynRhs a) = D1 (MetaData "PatSynRhs" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "BidirectionalPatSyn" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patRhsPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_patRhsOpposite") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PatSynWhere a))))) (C1 (MetaCons "OneDirectionalPatSyn" PrefixI True) (S1 (MetaSel (Just Symbol "_patRhsPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))))

data PatSynWhere a Source #

Where clause of pattern synonym (explicit expression direction)

Constructors

PatSynWhere 

Instances

type Rep (PatSynWhere a) Source # 
type Rep (PatSynWhere a) = D1 (MetaData "PatSynWhere" "Language.Haskell.Tools.AST.Decls" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PatSynWhere" PrefixI True) (S1 (MetaSel (Just Symbol "_patOpposite") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Match a))))

data ValueBind a Source #

Value binding for top-level and local bindings

Constructors

SimpleBind

Non-function binding ( v = "12" ) TODO: use one name for a function instead of names in each match

FunBind

Function binding ( f 0 = 1; f x = x ). All matches must have the same name.

Instances

type Rep (ValueBind a) Source # 
type Rep (ValueBind a) = D1 (MetaData "ValueBind" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "SimpleBind" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_valBindPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) ((:*:) (S1 (MetaSel (Just Symbol "_valBindRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Rhs a))) (S1 (MetaSel (Just Symbol "_valBindLocals") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe LocalBinds a)))))) (C1 (MetaCons "FunBind" PrefixI True) (S1 (MetaSel (Just Symbol "_funBindMatches") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Match a)))))

data Match a Source #

Clause of function (or value) binding

Constructors

Match 

Instances

type Rep (Match a) Source # 
type Rep (Match a) = D1 (MetaData "Match" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Match" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_matchLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann MatchLhs a))) ((:*:) (S1 (MetaSel (Just Symbol "_matchRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Rhs a))) (S1 (MetaSel (Just Symbol "_matchBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe LocalBinds a))))))

data MatchLhs a Source #

Something on the left side of the match

Instances

type Rep (MatchLhs a) Source # 
type Rep (MatchLhs a) = D1 (MetaData "MatchLhs" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "NormalLhs" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_matchLhsName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_matchLhsArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a))))) (C1 (MetaCons "InfixLhs" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_matchLhsLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_matchLhsOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a)))) ((:*:) (S1 (MetaSel (Just Symbol "_matchLhsRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_matchLhsArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a)))))))

data LocalBinds a Source #

Local bindings attached to a declaration ( where x = 42 )

Constructors

LocalBinds 

Instances

type Rep (LocalBinds a) Source # 
type Rep (LocalBinds a) = D1 (MetaData "LocalBinds" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "LocalBinds" PrefixI True) (S1 (MetaSel (Just Symbol "_localBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LocalBind a))))

data LocalBind a Source #

Bindings that are enabled in local blocks (where or let).

data TypeSignature a Source #

A type signature ( _f :: Int -> Int )

Constructors

TypeSignature 

Fields

Instances

type Rep (TypeSignature a) Source # 
type Rep (TypeSignature a) = D1 (MetaData "TypeSignature" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "TypeSignature" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tsName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_tsType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))

data FixitySignature a Source #

A fixity signature ( infixl 5 +, - ).

Instances

type Rep (FixitySignature a) Source # 
type Rep (FixitySignature a) = D1 (MetaData "FixitySignature" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "FixitySignature" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_fixityAssoc") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Assoc a))) ((:*:) (S1 (MetaSel (Just Symbol "_fixityPrecedence") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Precedence a))) (S1 (MetaSel (Just Symbol "_fixityOperators") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Operator a))))))

data Rhs a Source #

Right hand side of a value binding (possible with guards): ( = 3 or | x == 1 = 3; | otherwise = 4 )

Constructors

UnguardedRhs 

Fields

GuardedRhss 

Instances

type Rep (Rhs a) Source # 
type Rep (Rhs a) = D1 (MetaData "Rhs" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "UnguardedRhs" PrefixI True) (S1 (MetaSel (Just Symbol "_rhsExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))) (C1 (MetaCons "GuardedRhss" PrefixI True) (S1 (MetaSel (Just Symbol "_rhsGuards") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GuardedRhs a)))))

data GuardedRhs a Source #

A guarded right-hand side of a value binding ( | x > 3 = 2 )

Constructors

GuardedRhs 

Fields

Instances

type Rep (GuardedRhs a) Source # 
type Rep (GuardedRhs a) = D1 (MetaData "GuardedRhs" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "GuardedRhs" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_guardStmts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList RhsGuard a))) (S1 (MetaSel (Just Symbol "_guardExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))

data RhsGuard a Source #

Guards for value bindings and pattern matches ( Just v x, v 1 )

Constructors

GuardBind 

Fields

GuardLet 
GuardCheck 

Fields

Instances

type Rep (RhsGuard a) Source # 
type Rep (RhsGuard a) = D1 (MetaData "RhsGuard" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "GuardBind" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_guardPat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_guardRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) ((:+:) (C1 (MetaCons "GuardLet" PrefixI True) (S1 (MetaSel (Just Symbol "_guardBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LocalBind a)))) (C1 (MetaCons "GuardCheck" PrefixI True) (S1 (MetaSel (Just Symbol "_guardCheck") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))))

Pragmas

data TopLevelPragma a Source #

Top level pragmas

Instances

type Rep (TopLevelPragma a) Source # 
type Rep (TopLevelPragma a) = D1 (MetaData "TopLevelPragma" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "RulePragma" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaRule") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Rule a)))) (C1 (MetaCons "DeprPragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaObjects") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_pragmaMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a)))))) ((:+:) (C1 (MetaCons "WarningPragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaObjects") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Name a))) (S1 (MetaSel (Just Symbol "_pragmaMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a))))) (C1 (MetaCons "AnnPragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_annotationSubject") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann AnnotationSubject a))) (S1 (MetaSel (Just Symbol "_annotateExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))))) ((:+:) ((:+:) (C1 (MetaCons "InlinePragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaConlike") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ConlikeAnnot a))) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaPhase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PhaseControl a))) (S1 (MetaSel (Just Symbol "_inlineDef") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))))) (C1 (MetaCons "NoInlinePragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaConlike") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe ConlikeAnnot a))) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaPhase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PhaseControl a))) (S1 (MetaSel (Just Symbol "_noInlineDef") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))))))) ((:+:) (C1 (MetaCons "InlinablePragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaPhase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PhaseControl a))) (S1 (MetaSel (Just Symbol "_inlinableDef") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))))) ((:+:) (C1 (MetaCons "LinePragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaLineNum") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann LineNumber a))) (S1 (MetaSel (Just Symbol "_pragmaFileName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe StringNode a))))) (C1 (MetaCons "SpecializePragma" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_pragmaPhase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PhaseControl a))) ((:*:) (S1 (MetaSel (Just Symbol "_specializeDef") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_specializeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type a))))))))))

data Rule a Source #

A rewrite rule ( "map/map" forall f g xs. map f (map g xs) = map (f.g) xs )

Constructors

Rule 

Fields

Instances

data AnnotationSubject a Source #

Annotation allows you to connect an expression to any declaration.

Constructors

NameAnnotation

The definition with the given name is annotated

Fields

TypeAnnotation

A type with the given name is annotated

Fields

ModuleAnnotation

The whole module is annotated

Instances

type Rep (AnnotationSubject a) Source # 
type Rep (AnnotationSubject a) = D1 (MetaData "AnnotationSubject" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "NameAnnotation" PrefixI True) (S1 (MetaSel (Just Symbol "_annotateName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) ((:+:) (C1 (MetaCons "TypeAnnotation" PrefixI True) (S1 (MetaSel (Just Symbol "_annotateName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "ModuleAnnotation" PrefixI False) U1)))

data MinimalFormula a Source #

Formulas of minimal annotations declaring which functions should be defined.

Constructors

MinimalName 

Fields

MinimalParen 
MinimalOr

One of the minimal formulas are needed ( min1 | min2 )

MinimalAnd

Both of the minimal formulas are needed ( min1 , min2 )

Instances

type Rep (MinimalFormula a) Source # 
type Rep (MinimalFormula a) = D1 (MetaData "MinimalFormula" "Language.Haskell.Tools.AST.Binds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "MinimalName" PrefixI True) (S1 (MetaSel (Just Symbol "_minimalName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "MinimalParen" PrefixI True) (S1 (MetaSel (Just Symbol "_minimalInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann MinimalFormula a))))) ((:+:) (C1 (MetaCons "MinimalOr" PrefixI True) (S1 (MetaSel (Just Symbol "_minimalOrs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList MinimalFormula a)))) (C1 (MetaCons "MinimalAnd" PrefixI True) (S1 (MetaSel (Just Symbol "_minimalAnds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList MinimalFormula a))))))

data Expr a Source #

Haskell expressions

Constructors

Var

A variable or a data constructor ( a )

Fields

Lit

Primitive literal

Fields

InfixApp

Infix operator application ( a + b )

PrefixApp

Prefix operator application ( -x )

App

Function application ( f 4 ) unary minus omitted

Fields

Lambda

Lambda expression ( a b -> a + b )

Fields

Let

Local binding ( let x = 2; y = 3 in e x y )

Fields

If

If expression ( if a then b else c )

Fields

MultiIf

Multi way if expressions with MultiWayIf extension ( if | guard1 -> expr1; guard2 -> expr2 )

Case

Pattern matching expression ( case expr of pat1 -> expr1; pat2 -> expr2 )

Fields

Do

Do-notation expressions ( do x <- act1; act2 )

Tuple

Tuple expression ( (e1, e2, e3) )

Fields

UnboxedTuple

Unboxed tuple expression ( () )

Fields

TupleSection

Tuple section, enabled with TupleSections ( (a,,b) ). One of the elements must be missing.

UnboxedTupSec 
List

List expression: [1,2,3]

Fields

ParArray

Parallel array expression: [: 1,2,3 :]

Fields

Paren 

Fields

LeftSection

Left operator section: (1+)

RightSection

Right operator section: (+1)

RecCon

Record value construction: Point { x = 3, y = -2 }

RecUpdate

Record value update: p1 { x = 3, y = -2 }

Enum

Enumeration expression ( [1,3..10] )

ParArrayEnum

Parallel array enumeration ( [: 1,3 .. 10 :] )

ListComp

List comprehension ( [ (x, y) | x <- xs | y <- ys ] )

Fields

ParArrayComp

Parallel array comprehensions [: (x, y) | x <- xs , y <- ys :] enabled by ParallelArrays

Fields

TypeSig

Explicit type signature ( _x :: Int )

Fields

ExplTypeApp

Explicit type application ( show @Integer (read "5") )

Fields

VarQuote

'x for template haskell reifying of expressions

Fields

TypeQuote

''T for template haskell reifying of types

Fields

BracketExpr

Template haskell bracket expression

Fields

Splice

Template haskell splice expression, for example: $(gen a) or $x

Fields

QuasiQuoteExpr

Template haskell quasi-quotation: [$quoter|str]

Fields

ExprPragma 
Proc

Arrow definition: proc a -> f -< a+1

ArrowApp

Arrow application: f -< a+1

LamCase

Lambda case ( case 0 -> 1; 1 -> 2 )

Fields

StaticPtr

Static pointer expression ( static e ). The inner expression must be closed (cannot have variables bound outside) XML expressions omitted

Fields

Instances

type Rep (Expr a) Source # 
type Rep (Expr a) = D1 (MetaData "Expr" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Var" PrefixI True) (S1 (MetaSel (Just Symbol "_exprName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "Lit" PrefixI True) (S1 (MetaSel (Just Symbol "_exprLit") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Literal a))))) ((:+:) (C1 (MetaCons "InfixApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_exprOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_exprRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) (C1 (MetaCons "PrefixApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_exprRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))))) ((:+:) ((:+:) (C1 (MetaCons "App" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprFun") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprArg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) (C1 (MetaCons "Lambda" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprBindings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a))) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) ((:+:) (C1 (MetaCons "Let" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprFunBind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LocalBind a))) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) ((:+:) (C1 (MetaCons "If" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprCond") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_exprThen") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprElse") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) (C1 (MetaCons "MultiIf" PrefixI True) (S1 (MetaSel (Just Symbol "_exprIfAlts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList GuardedCaseRhs a)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Case" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprCase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprAlts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Alt a))))) (C1 (MetaCons "Do" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_doKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann DoKind a))) (S1 (MetaSel (Just Symbol "_exprStmts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Stmt a)))))) ((:+:) (C1 (MetaCons "Tuple" PrefixI True) (S1 (MetaSel (Just Symbol "_tupleElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Expr a)))) ((:+:) (C1 (MetaCons "UnboxedTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_tupleElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Expr a)))) (C1 (MetaCons "TupleSection" PrefixI True) (S1 (MetaSel (Just Symbol "_tupleSectionElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TupSecElem a))))))) ((:+:) ((:+:) (C1 (MetaCons "UnboxedTupSec" PrefixI True) (S1 (MetaSel (Just Symbol "_tupleSectionElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TupSecElem a)))) (C1 (MetaCons "List" PrefixI True) (S1 (MetaSel (Just Symbol "_listElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Expr a))))) ((:+:) (C1 (MetaCons "ParArray" PrefixI True) (S1 (MetaSel (Just Symbol "_listElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Expr a)))) ((:+:) (C1 (MetaCons "Paren" PrefixI True) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))) (C1 (MetaCons "LeftSection" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a)))))))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "RightSection" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_exprRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) (C1 (MetaCons "RecCon" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprRecName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_exprRecFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FieldUpdate a)))))) ((:+:) (C1 (MetaCons "RecUpdate" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprRecFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList FieldUpdate a))))) (C1 (MetaCons "Enum" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_enumFrom") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_enumThen") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a))) (S1 (MetaSel (Just Symbol "_enumTo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a)))))))) ((:+:) ((:+:) (C1 (MetaCons "ParArrayEnum" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_enumFrom") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_enumThen") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a))) (S1 (MetaSel (Just Symbol "_enumToFix") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) (C1 (MetaCons "ListComp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_compExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_compBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ListCompBody a)))))) ((:+:) (C1 (MetaCons "ParArrayComp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_compExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_compBody") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList ListCompBody a))))) ((:+:) (C1 (MetaCons "TypeSig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprSig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) (C1 (MetaCons "ExplTypeApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_exprType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "VarQuote" PrefixI True) (S1 (MetaSel (Just Symbol "_quotedName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "TypeQuote" PrefixI True) (S1 (MetaSel (Just Symbol "_quotedName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))))) ((:+:) (C1 (MetaCons "BracketExpr" PrefixI True) (S1 (MetaSel (Just Symbol "_bracket") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Bracket a)))) ((:+:) (C1 (MetaCons "Splice" PrefixI True) (S1 (MetaSel (Just Symbol "_innerExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Splice a)))) (C1 (MetaCons "QuasiQuoteExpr" PrefixI True) (S1 (MetaSel (Just Symbol "_exprQQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann QuasiQuote a))))))) ((:+:) ((:+:) (C1 (MetaCons "ExprPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_exprPragma") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ExprPragma a)))) (C1 (MetaCons "Proc" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_procPattern") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_procExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a)))))) ((:+:) (C1 (MetaCons "ArrowApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_exprLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_arrowAppl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ArrowAppl a))) (S1 (MetaSel (Just Symbol "_exprRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) ((:+:) (C1 (MetaCons "LamCase" PrefixI True) (S1 (MetaSel (Just Symbol "_exprAlts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Alt a)))) (C1 (MetaCons "StaticPtr" PrefixI True) (S1 (MetaSel (Just Symbol "_exprInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))))))))

data FieldUpdate a Source #

Field update expressions

Constructors

NormalFieldUpdate

Update of a field ( x = 1 )

Fields

FieldPun

Update the field to the value of the same name ( x )

FieldWildcard

Update the fields of the bounded names to their values ( .. ). Must be the last update. Cannot be used in a record update expression.

Instances

type Rep (FieldUpdate a) Source # 
type Rep (FieldUpdate a) = D1 (MetaData "FieldUpdate" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "NormalFieldUpdate" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_fieldName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_fieldValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) ((:+:) (C1 (MetaCons "FieldPun" PrefixI True) (S1 (MetaSel (Just Symbol "_fieldUpdateName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "FieldWildcard" PrefixI False) U1)))

data TupSecElem a Source #

An element of a tuple section that can be an expression or missing (indicating a value from a parameter)

Constructors

Present

An existing element in a tuple section

Fields

Missing

A missing element in a tuple section

Instances

type Rep (TupSecElem a) Source # 
type Rep (TupSecElem a) = D1 (MetaData "TupSecElem" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "Present" PrefixI True) (S1 (MetaSel (Just Symbol "_tupSecExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))) (C1 (MetaCons "Missing" PrefixI False) U1))

data Alt' expr a Source #

Clause of case expression

Constructors

Alt 

Instances

type Rep (Alt' expr a) Source # 
type Rep (Alt' expr a) = D1 (MetaData "Alt'" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Alt" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_altPattern") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) ((:*:) (S1 (MetaSel (Just Symbol "_altRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann (CaseRhs' expr) a))) (S1 (MetaSel (Just Symbol "_altBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe LocalBinds a))))))

data CaseRhs' expr a Source #

Right hand side of a match (possible with guards): ( = 3 or | x == 1 = 3; | otherwise = 4 )

Constructors

UnguardedCaseRhs 

Fields

GuardedCaseRhss 

Instances

type Rep (CaseRhs' expr a) Source # 
type Rep (CaseRhs' expr a) = D1 (MetaData "CaseRhs'" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "UnguardedCaseRhs" PrefixI True) (S1 (MetaSel (Just Symbol "_rhsCaseExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann expr a)))) (C1 (MetaCons "GuardedCaseRhss" PrefixI True) (S1 (MetaSel (Just Symbol "_rhsCaseGuards") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList (GuardedCaseRhs' expr) a)))))

data GuardedCaseRhs' expr a Source #

A guarded right-hand side of pattern matches binding ( | x > 3 -> 2 )

Constructors

GuardedCaseRhs 

Fields

Instances

type Rep (GuardedCaseRhs' expr a) Source # 
type Rep (GuardedCaseRhs' expr a) = D1 (MetaData "GuardedCaseRhs'" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "GuardedCaseRhs" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_caseGuardStmts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList RhsGuard a))) (S1 (MetaSel (Just Symbol "_caseGuardExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann expr a)))))

data ExprPragma a Source #

Pragmas that can be applied to expressions

Instances

type Rep (ExprPragma a) Source # 
type Rep (ExprPragma a) = D1 (MetaData "ExprPragma" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "CorePragma" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a)))) ((:+:) (C1 (MetaCons "SccPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a)))) (C1 (MetaCons "GeneratedPragma" PrefixI True) (S1 (MetaSel (Just Symbol "_pragmaSrcRange") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SourceRange a))))))

data SourceRange a Source #

In-AST source ranges (for generated pragmas)

Instances

type Rep (SourceRange a) Source # 
type Rep (SourceRange a) = D1 (MetaData "SourceRange" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "SourceRange" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_srFileName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann StringNode a))) (S1 (MetaSel (Just Symbol "_srFromLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Number a)))) ((:*:) (S1 (MetaSel (Just Symbol "_srFromCol") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Number a))) ((:*:) (S1 (MetaSel (Just Symbol "_srToLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Number a))) (S1 (MetaSel (Just Symbol "_srToCol") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Number a)))))))

data Number a Source #

Constructors

Number 

Instances

type Rep (Number a) Source # 
type Rep (Number a) = D1 (MetaData "Number" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Number" PrefixI True) (S1 (MetaSel (Just Symbol "_numberInteger") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))

data Cmd a Source #

Instances

type Rep (Cmd a) Source # 
type Rep (Cmd a) = D1 (MetaData "Cmd" "Language.Haskell.Tools.AST.Exprs" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "ArrowAppCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_cmdArrowOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann ArrowAppl a))) (S1 (MetaSel (Just Symbol "_cmdRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a)))))) (C1 (MetaCons "ArrowFormCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_cmdInnerCmds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Cmd a)))))) ((:+:) (C1 (MetaCons "AppCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdInnerCmd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a))) (S1 (MetaSel (Just Symbol "_cmdApplied") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))))) ((:+:) (C1 (MetaCons "InfixCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdLeftCmd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a))) ((:*:) (S1 (MetaSel (Just Symbol "_cmdOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_cmdRightCmd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a)))))) (C1 (MetaCons "LambdaCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdBindings") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a))) (S1 (MetaSel (Just Symbol "_cmdInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a)))))))) ((:+:) ((:+:) (C1 (MetaCons "ParenCmd" PrefixI True) (S1 (MetaSel (Just Symbol "_cmdInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a)))) (C1 (MetaCons "CaseCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_cmdAlts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList CmdAlt a)))))) ((:+:) (C1 (MetaCons "IfCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) ((:*:) (S1 (MetaSel (Just Symbol "_cmdThen") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a))) (S1 (MetaSel (Just Symbol "_cmdElse") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a)))))) ((:+:) (C1 (MetaCons "LetCmd" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cmdBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LocalBind a))) (S1 (MetaSel (Just Symbol "_cmdInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Cmd a))))) (C1 (MetaCons "DoCmd" PrefixI True) (S1 (MetaSel (Just Symbol "_cmdStmts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList (Stmt' Cmd) a))))))))

data Stmt' expr a Source #

Normal monadic statements

Constructors

BindStmt

Binding statement ( x <- action )

Fields

ExprStmt

Non-binding statement ( action )

Fields

LetStmt

Let statement ( let x = 3; y = 4 )

RecStmt

A recursive binding statement with ( rec b <- f a c; c <- f b a )

Fields

Instances

type Rep (Stmt' expr a) Source # 
type Rep (Stmt' expr a) = D1 (MetaData "Stmt'" "Language.Haskell.Tools.AST.Stmts" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "BindStmt" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_stmtPattern") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_stmtExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann expr a))))) (C1 (MetaCons "ExprStmt" PrefixI True) (S1 (MetaSel (Just Symbol "_stmtExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann expr a))))) ((:+:) (C1 (MetaCons "LetStmt" PrefixI True) (S1 (MetaSel (Just Symbol "_stmtBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList LocalBind a)))) (C1 (MetaCons "RecStmt" PrefixI True) (S1 (MetaSel (Just Symbol "_cmdStmtBinds") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList (Stmt' expr) a))))))

data ListCompBody a Source #

Body of a list comprehension: ( | x <- [1..10] )

Constructors

ListCompBody 

Instances

type Rep (ListCompBody a) Source # 
type Rep (ListCompBody a) = D1 (MetaData "ListCompBody" "Language.Haskell.Tools.AST.Stmts" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ListCompBody" PrefixI True) (S1 (MetaSel (Just Symbol "_compStmts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList CompStmt a))))

data CompStmt a Source #

List comprehension statement

Constructors

CompStmt

Normal monadic statement of a list comprehension

Fields

ThenStmt

Then statements by TransformListComp ( then sortWith by (x + y) )

Fields

GroupStmt

Grouping statements by TransformListComp ( then group by (x + y) using groupWith ) Note: either byExpr or usingExpr must have a value

Instances

type Rep (CompStmt a) Source # 
type Rep (CompStmt a) = D1 (MetaData "CompStmt" "Language.Haskell.Tools.AST.Stmts" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "CompStmt" PrefixI True) (S1 (MetaSel (Just Symbol "_compStmt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Stmt a)))) ((:+:) (C1 (MetaCons "ThenStmt" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_thenExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_byExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a))))) (C1 (MetaCons "GroupStmt" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_byExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a))) (S1 (MetaSel (Just Symbol "_usingExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe Expr a)))))))

data Pattern a Source #

Representation of patterns for pattern bindings

Constructors

VarPat

Pattern name binding

Fields

LitPat

Literal pattern

InfixPat

Infix constructor application pattern ( a :+: b )

AppPat

Constructor application pattern ( Point x y )

TuplePat

Tuple pattern ( (x,y) )

UnboxTuplePat

Unboxed tuple pattern ( () )

ListPat

List pattern ( [1,2,a,x] )

ParArrPat

Parallel array pattern ( [:1,2,a,x:] )

ParenPat

Parenthesised patterns

RecPat

Record pattern ( Point { x = 3, y } )

AsPat

As-pattern (explicit name binding) ( ls@(hd:_) )

WildPat

Wildcard pattern: ( _ )

IrrPat

Irrefutable pattern ( ~(x:_) )

BangPat

Bang pattern ( !x )

TypeSigPat

Pattern with explicit type signature ( __ :: Int )

ViewPat

View pattern ( f -> Just 1 ) regular list pattern omitted xml patterns omitted

SplicePat

Splice patterns: $(generateX inp)

QuasiQuotePat

Quasi-quoted patterns: [| 1 + 2 |]

Fields

NPlusKPat 

Instances

type Rep (Pattern a) Source # 
type Rep (Pattern a) = D1 (MetaData "Pattern" "Language.Haskell.Tools.AST.Patterns" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "VarPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "LitPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternLiteral") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Literal a))))) ((:+:) (C1 (MetaCons "InfixPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) ((:*:) (S1 (MetaSel (Just Symbol "_patternOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_patternRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))))) (C1 (MetaCons "AppPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_patternArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a))))))) ((:+:) ((:+:) (C1 (MetaCons "TuplePat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a)))) (C1 (MetaCons "UnboxTuplePat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a))))) ((:+:) (C1 (MetaCons "ListPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a)))) ((:+:) (C1 (MetaCons "ParArrPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Pattern a)))) (C1 (MetaCons "ParenPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "RecPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_patternFields") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList PatternField a))))) (C1 (MetaCons "AsPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))))) ((:+:) (C1 (MetaCons "WildPat" PrefixI False) U1) ((:+:) (C1 (MetaCons "IrrPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))) (C1 (MetaCons "BangPat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))))))) ((:+:) ((:+:) (C1 (MetaCons "TypeSigPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))) (S1 (MetaSel (Just Symbol "_patternType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) (C1 (MetaCons "ViewPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Expr a))) (S1 (MetaSel (Just Symbol "_patternInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a)))))) ((:+:) (C1 (MetaCons "SplicePat" PrefixI True) (S1 (MetaSel (Just Symbol "_patternSplice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Splice a)))) ((:+:) (C1 (MetaCons "QuasiQuotePat" PrefixI True) (S1 (MetaSel (Just Symbol "_patQQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann QuasiQuote a)))) (C1 (MetaCons "NPlusKPat" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_patternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_patternLit") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Literal a))))))))))

data PatternField a Source #

Constructors

NormalFieldPattern

Named field pattern ( p = Point 3 2 )

FieldPunPattern

Named field pun ( p )

FieldWildcardPattern

Wildcard field pattern ( .. )

Instances

type Rep (PatternField a) Source # 
type Rep (PatternField a) = D1 (MetaData "PatternField" "Language.Haskell.Tools.AST.Patterns" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "NormalFieldPattern" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_fieldPatternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_fieldPattern") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Pattern a))))) ((:+:) (C1 (MetaCons "FieldPunPattern" PrefixI True) (S1 (MetaSel (Just Symbol "_fieldPatternName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "FieldWildcardPattern" PrefixI False) U1)))

data TyVar a Source #

Type variable declaration

Instances

type Rep (TyVar a) Source # 
type Rep (TyVar a) = D1 (MetaData "TyVar" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "TyVarDecl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tyVarName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_tyVarKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe KindConstraint a)))))

data Type a Source #

Haskell types

Constructors

TyForall

Forall types ( forall x y . type )

TyCtx

Type with a context ( forall x y . type )

Fields

TyFun

Function types ( a -> b )

Fields

TyTuple

Tuple types ( (a,b) )

TyUnbTuple

Unboxed tuple types ( () )

TyList

List type with special syntax ( [a] )

Fields

TyParArray

Parallel array type ( [:a:] )

Fields

TyApp

Type application ( F a )

Fields

TyVar

type variable or constructor ( a )

Fields

TyParen

type surrounded by parentheses ( (T a) )

Fields

TyInfix

Infix type constructor ( (a <: b) )

TyKinded

Type with explicit kind signature ( _a :: * )

Fields

TyPromoted 

Fields

TySplice

a Template Haskell splice type ( $(genType) ).

Fields

TyQuasiQuote

a Template Haskell quasi-quote type ( [quoter| ... ] ).

Fields

TyBang

Strict type marked with !.

Fields

TyLazy

Lazy type marked with ~. (Should only be used if Strict or StrictData language extension is used)

Fields

TyUnpack

Strict type marked with UNPACK pragma. (Usually contains the bang mark.)

Fields

TyNoUnpack

Strict type marked with NOUNPACK pragma. (Usually contains the bang mark.)

Fields

TyWildcard

A wildcard type ( _ ) with -XPartialTypeSignatures

TyNamedWildc

A named wildcard type ( _t ) with -XPartialTypeSignatures

Instances

type Rep (Type a) Source # 
type Rep (Type a) = D1 (MetaData "Type" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TyForall" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeBounded") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList TyVar a))) (S1 (MetaSel (Just Symbol "_typeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) (C1 (MetaCons "TyCtx" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeCtx") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Context a))) (S1 (MetaSel (Just Symbol "_typeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))) ((:+:) (C1 (MetaCons "TyFun" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeParam") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) (S1 (MetaSel (Just Symbol "_typeResult") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) ((:+:) (C1 (MetaCons "TyTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type a)))) (C1 (MetaCons "TyUnbTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type a))))))) ((:+:) ((:+:) (C1 (MetaCons "TyList" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElement") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "TyParArray" PrefixI True) (S1 (MetaSel (Just Symbol "_typeElement") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) ((:+:) (C1 (MetaCons "TyApp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeCon") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) (S1 (MetaSel (Just Symbol "_typeArg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))))) ((:+:) (C1 (MetaCons "TyVar" PrefixI True) (S1 (MetaSel (Just Symbol "_typeName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))) (C1 (MetaCons "TyParen" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TyInfix" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeLeft") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) ((:*:) (S1 (MetaSel (Just Symbol "_typeOperator") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_typeRight") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))) (C1 (MetaCons "TyKinded" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) (S1 (MetaSel (Just Symbol "_typeKind") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Kind a)))))) ((:+:) (C1 (MetaCons "TyPromoted" PrefixI True) (S1 (MetaSel (Just Symbol "_tpPromoted") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann (Promoted Type) a)))) ((:+:) (C1 (MetaCons "TySplice" PrefixI True) (S1 (MetaSel (Just Symbol "_tsSplice") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Splice a)))) (C1 (MetaCons "TyQuasiQuote" PrefixI True) (S1 (MetaSel (Just Symbol "_typeQQ") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (QuasiQuote a))))))) ((:+:) ((:+:) (C1 (MetaCons "TyBang" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) ((:+:) (C1 (MetaCons "TyLazy" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) (C1 (MetaCons "TyUnpack" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))) ((:+:) (C1 (MetaCons "TyNoUnpack" PrefixI True) (S1 (MetaSel (Just Symbol "_typeInner") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))) ((:+:) (C1 (MetaCons "TyWildcard" PrefixI False) U1) (C1 (MetaCons "TyNamedWildc" PrefixI True) (S1 (MetaSel (Just Symbol "_typeWildcardName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))))))))

data Context a Source #

Constructors

ContextOne

One assertion ( C a => ... )

ContextMulti

A set of assertions ( (C1 a, C2 b) => ... , but can be one: (C a) => ... )

Instances

type Rep (Context a) Source # 
type Rep (Context a) = D1 (MetaData "Context" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "ContextOne" PrefixI True) (S1 (MetaSel (Just Symbol "_contextAssertion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Assertion a)))) (C1 (MetaCons "ContextMulti" PrefixI True) (S1 (MetaSel (Just Symbol "_contextAssertions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Assertion a)))))

data Assertion a Source #

A single assertion in the context

Constructors

ClassAssert

Class assertion (Cls x)

InfixAssert

Infix class assertion, also contains type equations ( a ~ X y )

Instances

type Rep (Assertion a) Source # 
type Rep (Assertion a) = D1 (MetaData "Assertion" "Language.Haskell.Tools.AST.Types" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "ClassAssert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_assertClsName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a))) (S1 (MetaSel (Just Symbol "_assertTypes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList Type a))))) (C1 (MetaCons "InfixAssert" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_assertLhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a))) ((:*:) (S1 (MetaSel (Just Symbol "_assertOp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Operator a))) (S1 (MetaSel (Just Symbol "_assertRhs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Type a)))))))

data KindConstraint a Source #

Kind constraint ( :: * -> * )

Constructors

KindConstraint 

Fields

Instances

type Rep (KindConstraint a) Source # 
type Rep (KindConstraint a) = D1 (MetaData "KindConstraint" "Language.Haskell.Tools.AST.Kinds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "KindConstraint" PrefixI True) (S1 (MetaSel (Just Symbol "_kindConstr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Kind a))))

data Kind a Source #

Haskell kinds

Constructors

KindStar

*, the kind of types

KindUnbox

#, the kind of unboxed types

KindFn

->, the kind of type constructor

Fields

KindParen

A parenthesised kind

Fields

KindVar

kind variable (using PolyKinds extension)

Fields

KindApp

Kind application ( k1 k2 )

Fields

KindList

A list kind ( [k] )

Fields

KindPromoted

A promoted kind ( '(k1,k2,k3) )

Instances

data Promoted t a Source #

Instances

type Rep (Promoted k a) Source # 
type Rep (Promoted k a) = D1 (MetaData "Promoted" "Language.Haskell.Tools.AST.Kinds" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "PromotedInt" PrefixI True) (S1 (MetaSel (Just Symbol "_promotedIntValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer))) ((:+:) (C1 (MetaCons "PromotedString" PrefixI True) (S1 (MetaSel (Just Symbol "_promotedStringValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) (C1 (MetaCons "PromotedCon" PrefixI True) (S1 (MetaSel (Just Symbol "_promotedConName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann Name a)))))) ((:+:) (C1 (MetaCons "PromotedList" PrefixI True) (S1 (MetaSel (Just Symbol "_promotedElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList k a)))) ((:+:) (C1 (MetaCons "PromotedTuple" PrefixI True) (S1 (MetaSel (Just Symbol "_promotedElements") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList k a)))) (C1 (MetaCons "PromotedUnit" PrefixI False) U1))))

data Literal a Source #

Haskell literals

Constructors

CharLit

Character literal: c

Fields

StringLit

String literal: "abc"

IntLit

Integer literal: 12

FracLit

Fractional literal: 3.14

PrimIntLit

Primitive integer literal (of type Int#): 32#

PrimWordLit

Primitive word literal (of type Word#): 32##

PrimFloatLit

Primitive float literal (of type Float#): 3.14#

PrimDoubleLit

Primitive double literal (of type Double#): 3.14##

PrimCharLit

Primitive character literal (of type Char#): c#

Fields

PrimStringLit 

Instances

type Rep (Literal a) Source # 
type Rep (Literal a) = D1 (MetaData "Literal" "Language.Haskell.Tools.AST.Literals" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "CharLit" PrefixI True) (S1 (MetaSel (Just Symbol "_charLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Char))) (C1 (MetaCons "StringLit" PrefixI True) (S1 (MetaSel (Just Symbol "_stringLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) ((:+:) (C1 (MetaCons "IntLit" PrefixI True) (S1 (MetaSel (Just Symbol "_intLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer))) ((:+:) (C1 (MetaCons "FracLit" PrefixI True) (S1 (MetaSel (Just Symbol "_fracLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Rational))) (C1 (MetaCons "PrimIntLit" PrefixI True) (S1 (MetaSel (Just Symbol "_intLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))))) ((:+:) ((:+:) (C1 (MetaCons "PrimWordLit" PrefixI True) (S1 (MetaSel (Just Symbol "_intLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer))) (C1 (MetaCons "PrimFloatLit" PrefixI True) (S1 (MetaSel (Just Symbol "_floatLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Rational)))) ((:+:) (C1 (MetaCons "PrimDoubleLit" PrefixI True) (S1 (MetaSel (Just Symbol "_floatLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Rational))) ((:+:) (C1 (MetaCons "PrimCharLit" PrefixI True) (S1 (MetaSel (Just Symbol "_charLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Char))) (C1 (MetaCons "PrimStringLit" PrefixI True) (S1 (MetaSel (Just Symbol "_stringLitValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))))))

data Operator a Source #

Constructors

BacktickOp

Backtick operator name: a mod b

NormalOp 

Instances

type Rep (Operator a) Source # 
type Rep (Operator a) = D1 (MetaData "Operator" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "BacktickOp" PrefixI True) (S1 (MetaSel (Just Symbol "_operatorName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a)))) (C1 (MetaCons "NormalOp" PrefixI True) (S1 (MetaSel (Just Symbol "_operatorName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a)))))

data Name a Source #

Constructors

ParenName

Parenthesized name: foldl (+) 0

NormalName 

Instances

type Rep (Name a) Source # 
type Rep (Name a) = D1 (MetaData "Name" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "ParenName" PrefixI True) (S1 (MetaSel (Just Symbol "_simpleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a)))) (C1 (MetaCons "NormalName" PrefixI True) (S1 (MetaSel (Just Symbol "_simpleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann SimpleName a)))))

data SimpleName a Source #

Possible qualified names. Contains also implicit names. Linear implicit parameter: %x. Non-linear implicit parameter: ?x.

Instances

type Rep (SimpleName a) Source # 
type Rep (SimpleName a) = D1 (MetaData "SimpleName" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "SimpleName" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_qualifiers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnList UnqualName a))) (S1 (MetaSel (Just Symbol "_unqualifiedName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann UnqualName a)))))

data UnqualName a Source #

Parts of a qualified name.

Constructors

UnqualName 

Instances

type Rep (UnqualName a) Source # 
type Rep (UnqualName a) = D1 (MetaData "UnqualName" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "UnqualName" PrefixI True) (S1 (MetaSel (Just Symbol "_simpleNameStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

data StringNode a Source #

Program elements formatted as string literals (import packages, pragma texts)

Constructors

StringNode 

Instances

type Rep (StringNode a) Source # 
type Rep (StringNode a) = D1 (MetaData "StringNode" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "StringNode" PrefixI True) (S1 (MetaSel (Just Symbol "_stringNodeStr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

data DataOrNewtypeKeyword a Source #

The data or the newtype keyword to define ADTs.

Instances

type Rep (DataOrNewtypeKeyword a) Source # 
type Rep (DataOrNewtypeKeyword a) = D1 (MetaData "DataOrNewtypeKeyword" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "DataKeyword" PrefixI False) U1) (C1 (MetaCons "NewtypeKeyword" PrefixI False) U1))

data DoKind a Source #

Keywords do or mdo to start a do-block

Constructors

DoKeyword 
MDoKeyword 

Instances

type Rep (DoKind a) Source # 
type Rep (DoKind a) = D1 (MetaData "DoKind" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "DoKeyword" PrefixI False) U1) (C1 (MetaCons "MDoKeyword" PrefixI False) U1))

data TypeKeyword a Source #

The type keyword used to qualify that the type and not the constructor of the same name is referred

Constructors

TypeKeyword 

Instances

type Rep (TypeKeyword a) Source # 
type Rep (TypeKeyword a) = D1 (MetaData "TypeKeyword" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "TypeKeyword" PrefixI False) U1)

data OverlapPragma a Source #

Recognised overlaps for overlap pragmas. Can be applied to class declarations and class instance declarations.

Constructors

EnableOverlap

OVERLAP pragma

DisableOverlap

NO_OVERLAP pragma

Overlappable

OVERLAPPABLE pragma

Overlapping

OVERLAPPING pragma

Overlaps

OVERLAPS pragma

IncoherentOverlap

INCOHERENT pragma

Instances

type Rep (OverlapPragma a) Source # 
type Rep (OverlapPragma a) = D1 (MetaData "OverlapPragma" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "EnableOverlap" PrefixI False) U1) ((:+:) (C1 (MetaCons "DisableOverlap" PrefixI False) U1) (C1 (MetaCons "Overlappable" PrefixI False) U1))) ((:+:) (C1 (MetaCons "Overlapping" PrefixI False) U1) ((:+:) (C1 (MetaCons "Overlaps" PrefixI False) U1) (C1 (MetaCons "IncoherentOverlap" PrefixI False) U1))))

data CallConv a Source #

Call conventions of foreign functions

Instances

type Rep (CallConv a) Source # 
type Rep (CallConv a) = D1 (MetaData "CallConv" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "StdCall" PrefixI False) U1) (C1 (MetaCons "CCall" PrefixI False) U1)) ((:+:) (C1 (MetaCons "CPlusPlus" PrefixI False) U1) (C1 (MetaCons "DotNet" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Jvm" PrefixI False) U1) (C1 (MetaCons "Js" PrefixI False) U1)) ((:+:) (C1 (MetaCons "JavaScript" PrefixI False) U1) (C1 (MetaCons "CApi" PrefixI False) U1))))

data ArrowAppl a Source #

Constructors

LeftAppl

Left arrow application: -<

RightAppl

Right arrow application: >-

LeftHighApp

Left arrow high application: -<<

RightHighApp

Right arrow high application: >>-

Instances

type Rep (ArrowAppl a) Source # 
type Rep (ArrowAppl a) = D1 (MetaData "ArrowAppl" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "LeftAppl" PrefixI False) U1) (C1 (MetaCons "RightAppl" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LeftHighApp" PrefixI False) U1) (C1 (MetaCons "RightHighApp" PrefixI False) U1)))

data Safety a Source #

Safety annotations for foreign calls

Instances

type Rep (Safety a) Source # 
type Rep (Safety a) = D1 (MetaData "Safety" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) ((:+:) (C1 (MetaCons "Safe" PrefixI False) U1) (C1 (MetaCons "ThreadSafe" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Unsafe" PrefixI False) U1) (C1 (MetaCons "Interruptible" PrefixI False) U1)))

data Assoc a Source #

Associativity of an operator.

Constructors

AssocNone

non-associative operator (declared with infix)

AssocLeft

left-associative operator (declared with infixl)

AssocRight

right-associative operator (declared with infixr)

Instances

type Rep (Assoc a) Source # 
type Rep (Assoc a) = D1 (MetaData "Assoc" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "AssocNone" PrefixI False) U1) ((:+:) (C1 (MetaCons "AssocLeft" PrefixI False) U1) (C1 (MetaCons "AssocRight" PrefixI False) U1)))

data Role a Source #

Instances

type Rep (Role a) Source # 
type Rep (Role a) = D1 (MetaData "Role" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) ((:+:) (C1 (MetaCons "Nominal" PrefixI False) U1) ((:+:) (C1 (MetaCons "Representational" PrefixI False) U1) (C1 (MetaCons "Phantom" PrefixI False) U1)))

data ConlikeAnnot a Source #

Constructors

ConlikeAnnot 

Instances

type Rep (ConlikeAnnot a) Source # 
type Rep (ConlikeAnnot a) = D1 (MetaData "ConlikeAnnot" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "ConlikeAnnot" PrefixI False) U1)

data Precedence a Source #

Numeric precedence of an operator

Constructors

Precedence 

Instances

type Rep (Precedence a) Source # 
type Rep (Precedence a) = D1 (MetaData "Precedence" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Precedence" PrefixI True) (S1 (MetaSel (Just Symbol "_precedenceValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data LineNumber a Source #

Constructors

LineNumber 

Fields

Instances

type Rep (LineNumber a) Source # 
type Rep (LineNumber a) = D1 (MetaData "LineNumber" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "LineNumber" PrefixI True) (S1 (MetaSel (Just Symbol "_lineNumber") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data PhaseControl a Source #

Controls the activation of a rewrite rule ( [1] )

Instances

type Rep (PhaseControl a) Source # 
type Rep (PhaseControl a) = D1 (MetaData "PhaseControl" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PhaseControl" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_phaseUntil") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AnnMaybe PhaseInvert a))) (S1 (MetaSel (Just Symbol "_phaseNumber") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Ann PhaseNumber a)))))

data PhaseNumber a Source #

Phase number for rewrite rules

Constructors

PhaseNumber 

Fields

Instances

type Rep (PhaseNumber a) Source # 
type Rep (PhaseNumber a) = D1 (MetaData "PhaseNumber" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PhaseNumber" PrefixI True) (S1 (MetaSel (Just Symbol "_phaseNum") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Integer)))

data PhaseInvert a Source #

A tilde that marks the inversion of the phase number

Constructors

PhaseInvert 

Instances

type Rep (PhaseInvert a) Source # 
type Rep (PhaseInvert a) = D1 (MetaData "PhaseInvert" "Language.Haskell.Tools.AST.Base" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "PhaseInvert" PrefixI False) U1)

data Ann elem annot Source #

An element of the AST keeping extra information.

Constructors

Ann 

Fields

  • _annotation :: annot

    The extra information for the AST part

  • _element :: elem annot

    The original AST part

Instances

HasAnnot (Ann e) Source # 

Methods

getAnnot :: Ann e a -> a Source #

type Rep (Ann e a) Source # 
type Rep (Ann e a) = D1 (MetaData "Ann" "Language.Haskell.Tools.AST.Ann" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "Ann" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_annotation") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) (S1 (MetaSel (Just Symbol "_element") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (e a)))))

element :: forall elem annot elem'. Lens (Ann elem annot) (Ann elem' annot) (elem annot) (elem' annot) Source #

annotation :: forall elem annot. Lens (Ann elem annot) (Ann elem annot) annot annot Source #

data NodeInfo sema src Source #

Semantic and source code related information for an AST node.

Constructors

NodeInfo 

Fields

Instances

(Eq sema, Eq src) => Eq (NodeInfo sema src) Source # 

Methods

(==) :: NodeInfo sema src -> NodeInfo sema src -> Bool #

(/=) :: NodeInfo sema src -> NodeInfo sema src -> Bool #

(Data sema, Data src) => Data (NodeInfo sema src) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NodeInfo sema src -> c (NodeInfo sema src) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NodeInfo sema src) #

toConstr :: NodeInfo sema src -> Constr #

dataTypeOf :: NodeInfo sema src -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (NodeInfo sema src)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NodeInfo sema src)) #

gmapT :: (forall b. Data b => b -> b) -> NodeInfo sema src -> NodeInfo sema src #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo sema src -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo sema src -> r #

gmapQ :: (forall d. Data d => d -> u) -> NodeInfo sema src -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NodeInfo sema src -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NodeInfo sema src -> m (NodeInfo sema src) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo sema src -> m (NodeInfo sema src) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo sema src -> m (NodeInfo sema src) #

(Show sema, Show src) => Show (NodeInfo sema src) Source # 

Methods

showsPrec :: Int -> NodeInfo sema src -> ShowS #

show :: NodeInfo sema src -> String #

showList :: [NodeInfo sema src] -> ShowS #

HasRange (NodeInfo sema SpanInfo) Source # 

sourceInfo :: forall sema src src'. Lens (NodeInfo sema src) (NodeInfo sema src') src src' Source #

semanticInfo :: forall sema src sema'. Lens (NodeInfo sema src) (NodeInfo sema' src) sema sema' Source #

data SpanInfo Source #

Location info for different types of nodes

Instances

Eq SpanInfo Source # 
Data SpanInfo Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpanInfo -> c SpanInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpanInfo #

toConstr :: SpanInfo -> Constr #

dataTypeOf :: SpanInfo -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SpanInfo) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpanInfo) #

gmapT :: (forall b. Data b => b -> b) -> SpanInfo -> SpanInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpanInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpanInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> SpanInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpanInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpanInfo -> m SpanInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanInfo -> m SpanInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanInfo -> m SpanInfo #

Show SpanInfo Source # 
HasRange (NodeInfo sema SpanInfo) Source # 

spanRange :: SpanInfo -> SrcSpan Source #

Extracts the concrete range corresponding to a given span. In case of lists and optional elements, it may not contain the elements inside.

class HasRange annot where Source #

Minimal complete definition

getRange

Methods

getRange :: annot -> SrcSpan Source #

Instances

data SemanticInfo n Source #

Semantic information for an AST node. Semantic information is currently heterogeneous.

Constructors

NoSemanticInfo

Semantic info type for any node not carrying additional semantic information

ScopeInfo 

Fields

NameInfo

Info corresponding to a name

Fields

ModuleInfo

Info for the module element

Fields

ImportInfo

Info corresponding to an import declaration

Fields

AmbiguousNameInfo 

Instances

Eq n => Eq (SemanticInfo n) Source # 
Data n => Data (SemanticInfo n) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SemanticInfo n -> c (SemanticInfo n) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SemanticInfo n) #

toConstr :: SemanticInfo n -> Constr #

dataTypeOf :: SemanticInfo n -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (SemanticInfo n)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SemanticInfo n)) #

gmapT :: (forall b. Data b => b -> b) -> SemanticInfo n -> SemanticInfo n #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SemanticInfo n -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SemanticInfo n -> r #

gmapQ :: (forall d. Data d => d -> u) -> SemanticInfo n -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SemanticInfo n -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SemanticInfo n -> m (SemanticInfo n) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SemanticInfo n -> m (SemanticInfo n) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SemanticInfo n -> m (SemanticInfo n) #

Outputable n => Show (SemanticInfo n) Source # 

importedNames :: forall n. Partial (SemanticInfo n) (SemanticInfo n) [n] [n] Source #

data AnnList e a Source #

A list of AST elements

Constructors

AnnList 

Fields

Instances

HasAnnot (AnnList e) Source # 

Methods

getAnnot :: AnnList e a -> a Source #

type Rep (AnnList e a) Source # 
type Rep (AnnList e a) = D1 (MetaData "AnnList" "Language.Haskell.Tools.AST.Ann" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "AnnList" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_annListAnnot") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) (S1 (MetaSel (Just Symbol "_annListElems") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Ann e a]))))

annListElems :: forall e a e'. Lens (AnnList e a) (AnnList e' a) [Ann e a] [Ann e' a] Source #

annListAnnot :: forall e a. Lens (AnnList e a) (AnnList e a) a a Source #

annList :: Traversal (AnnList e a) (AnnList e' a) (Ann e a) (Ann e' a) Source #

data AnnMaybe e a Source #

An optional AST element

Constructors

AnnMaybe 

Fields

Instances

HasAnnot (AnnMaybe e) Source # 

Methods

getAnnot :: AnnMaybe e a -> a Source #

type Rep (AnnMaybe e a) Source # 
type Rep (AnnMaybe e a) = D1 (MetaData "AnnMaybe" "Language.Haskell.Tools.AST.Ann" "haskell-tools-ast-0.1.2.1-CzlAZkyZDseK8YrtUILC1o" False) (C1 (MetaCons "AnnMaybe" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_annMaybeAnnot") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)) (S1 (MetaSel (Just Symbol "_annMaybe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Ann e a))))))

annMaybeAnnot :: forall e a. Lens (AnnMaybe e a) (AnnMaybe e a) a a Source #

annMaybe :: forall e a e'. Lens (AnnMaybe e a) (AnnMaybe e' a) (Maybe (Ann e a)) (Maybe (Ann e' a)) Source #

annJust :: Partial (AnnMaybe e a) (AnnMaybe e' a) (Ann e a) (Ann e' a) Source #

annNil :: a -> AnnList e a Source #

An empty list of AST elements

annNothing :: a -> AnnMaybe e a Source #

A non-existing AST part

class HasAnnot node where Source #

Minimal complete definition

getAnnot

Methods

getAnnot :: node a -> a Source #

Instances

HasAnnot (Ann e) Source # 

Methods

getAnnot :: Ann e a -> a Source #

HasAnnot (AnnList e) Source # 

Methods

getAnnot :: AnnList e a -> a Source #

HasAnnot (AnnMaybe e) Source # 

Methods

getAnnot :: AnnMaybe e a -> a Source #

modDecl :: forall a. Lens (Module a) (Module a) (AnnList Decl a) (AnnList Decl a) Source #

ieName :: forall a. Lens (IESpec a) (IESpec a) (Ann Name a) (Ann Name a) Source #

essList :: forall a a'. Partial (SubSpec a) (SubSpec a') (AnnList Name a) (AnnList Name a') Source #

declValBind :: forall a. Partial (Decl a) (Decl a) (Ann ValueBind a) (Ann ValueBind a) Source #

declTypes :: forall a. Partial (Decl a) (Decl a) (AnnList Type a) (AnnList Type a) Source #

declType :: forall a. Partial (Decl a) (Decl a) (Ann Type a) (Ann Type a) Source #

declSplice :: forall a. Partial (Decl a) (Decl a) (Ann Splice a) (Ann Splice a) Source #

declRoles :: forall a. Partial (Decl a) (Decl a) (AnnList Role a) (AnnList Role a) Source #

declName :: forall a. Partial (Decl a) (Decl a) (Ann Name a) (Ann Name a) Source #

declHead :: forall a. Partial (Decl a) (Decl a) (Ann DeclHead a) (Ann DeclHead a) Source #

declCallConv :: forall a. Partial (Decl a) (Decl a) (Ann CallConv a) (Ann CallConv a) Source #

declAssignedType :: forall a. Partial (Decl a) (Decl a) (Ann Type a) (Ann Type a) Source #

dhRight :: forall a. Partial (DeclHead a) (DeclHead a) (Ann TyVar a) (Ann TyVar a) Source #

dhName :: forall a. Partial (DeclHead a) (DeclHead a) (Ann Name a) (Ann Name a) Source #

dhLeft :: forall a. Partial (DeclHead a) (DeclHead a) (Ann TyVar a) (Ann TyVar a) Source #

gadtFieldType :: forall a. Lens (GadtField a) (GadtField a) (Ann Type a) (Ann Type a) Source #

funDeps :: forall a a'. Lens (FunDeps a) (FunDeps a') (AnnList FunDep a) (AnnList FunDep a') Source #

funDepRhs :: forall a. Lens (FunDep a) (FunDep a) (AnnList Name a) (AnnList Name a) Source #

funDepLhs :: forall a. Lens (FunDep a) (FunDep a) (AnnList Name a) (AnnList Name a) Source #

conDeclRhs :: forall a. Partial (ConDecl a) (ConDecl a) (Ann Type a) (Ann Type a) Source #

conDeclName :: forall a. Partial (ConDecl a) (ConDecl a) (Ann Name a) (Ann Name a) Source #

conDeclLhs :: forall a. Partial (ConDecl a) (ConDecl a) (Ann Type a) (Ann Type a) Source #

fieldType :: forall a. Lens (FieldDecl a) (FieldDecl a) (Ann Type a) (Ann Type a) Source #

teRhs :: forall a. Lens (TypeEqn a) (TypeEqn a) (Ann Type a) (Ann Type a) Source #

teLhs :: forall a. Lens (TypeEqn a) (TypeEqn a) (Ann Type a) (Ann Type a) Source #

kindConstr :: forall a a'. Lens (KindConstraint a) (KindConstraint a') (Ann Kind a) (Ann Kind a') Source #

tyVarName :: forall a. Lens (TyVar a) (TyVar a) (Ann Name a) (Ann Name a) Source #

typeWildcardName :: forall a. Partial (Type a) (Type a) (Ann Name a) (Ann Name a) Source #

typeType :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeRight :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeResult :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeQQ :: forall a. Partial (Type a) (Type a) (QuasiQuote a) (QuasiQuote a) Source #

typeParam :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeOperator :: forall a. Partial (Type a) (Type a) (Ann Operator a) (Ann Operator a) Source #

typeName :: forall a. Partial (Type a) (Type a) (Ann Name a) (Ann Name a) Source #

typeLeft :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeKind :: forall a. Partial (Type a) (Type a) (Ann Kind a) (Ann Kind a) Source #

typeInner :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeElements :: forall a. Partial (Type a) (Type a) (AnnList Type a) (AnnList Type a) Source #

typeElement :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeCtx :: forall a. Partial (Type a) (Type a) (Ann Context a) (Ann Context a) Source #

typeCon :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

typeBounded :: forall a. Partial (Type a) (Type a) (AnnList TyVar a) (AnnList TyVar a) Source #

typeArg :: forall a. Partial (Type a) (Type a) (Ann Type a) (Ann Type a) Source #

tsSplice :: forall a. Partial (Type a) (Type a) (Splice a) (Splice a) Source #

tpPromoted :: forall a. Partial (Type a) (Type a) (Ann (Promoted Type) a) (Ann (Promoted Type) a) Source #

kindVar :: forall a. Partial (Kind a) (Kind a) (Ann Name a) (Ann Name a) Source #

kindRight :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

kindPromoted :: forall a. Partial (Kind a) (Kind a) (Ann (Promoted Kind) a) (Ann (Promoted Kind) a) Source #

kindParen :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

kindLeft :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

kindElem :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

kindAppFun :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

kindAppArg :: forall a. Partial (Kind a) (Kind a) (Ann Kind a) (Ann Kind a) Source #

assertRhs :: forall a. Partial (Assertion a) (Assertion a) (Ann Type a) (Ann Type a) Source #

assertLhs :: forall a. Partial (Assertion a) (Assertion a) (Ann Type a) (Ann Type a) Source #

tupleElems :: forall a. Partial (Expr a) (Expr a) (AnnList Expr a) (AnnList Expr a) Source #

quotedName :: forall a. Partial (Expr a) (Expr a) (Ann Name a) (Ann Name a) Source #

procPattern :: forall a. Partial (Expr a) (Expr a) (Ann Pattern a) (Ann Pattern a) Source #

procExpr :: forall a. Partial (Expr a) (Expr a) (Ann Cmd a) (Ann Cmd a) Source #

listElems :: forall a. Partial (Expr a) (Expr a) (AnnList Expr a) (AnnList Expr a) Source #

innerExpr :: forall a. Partial (Expr a) (Expr a) (Ann Splice a) (Ann Splice a) Source #

exprType :: forall a. Partial (Expr a) (Expr a) (Ann Type a) (Ann Type a) Source #

exprThen :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprStmts :: forall a. Partial (Expr a) (Expr a) (AnnList Stmt a) (AnnList Stmt a) Source #

exprSig :: forall a. Partial (Expr a) (Expr a) (Ann Type a) (Ann Type a) Source #

exprRhs :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprRecName :: forall a. Partial (Expr a) (Expr a) (Ann Name a) (Ann Name a) Source #

exprQQ :: forall a. Partial (Expr a) (Expr a) (Ann QuasiQuote a) (Ann QuasiQuote a) Source #

exprOperator :: forall a. Partial (Expr a) (Expr a) (Ann Operator a) (Ann Operator a) Source #

exprName :: forall a. Partial (Expr a) (Expr a) (Ann Name a) (Ann Name a) Source #

exprLit :: forall a. Partial (Expr a) (Expr a) (Ann Literal a) (Ann Literal a) Source #

exprLhs :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprInner :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprFun :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprElse :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprCond :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprCase :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprArg :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

exprAlts :: forall a. Partial (Expr a) (Expr a) (AnnList Alt a) (AnnList Alt a) Source #

enumToFix :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

enumTo :: forall a. Partial (Expr a) (Expr a) (AnnMaybe Expr a) (AnnMaybe Expr a) Source #

enumThen :: forall a. Partial (Expr a) (Expr a) (AnnMaybe Expr a) (AnnMaybe Expr a) Source #

enumFrom :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

doKind :: forall a. Partial (Expr a) (Expr a) (Ann DoKind a) (Ann DoKind a) Source #

compExpr :: forall a. Partial (Expr a) (Expr a) (Ann Expr a) (Ann Expr a) Source #

bracket :: forall a. Partial (Expr a) (Expr a) (Ann Bracket a) (Ann Bracket a) Source #

arrowAppl :: forall a. Partial (Expr a) (Expr a) (Ann ArrowAppl a) (Ann ArrowAppl a) Source #

stmtPattern :: forall expr a. Partial (Stmt' expr a) (Stmt' expr a) (Ann Pattern a) (Ann Pattern a) Source #

stmtExpr :: forall expr a. Partial (Stmt' expr a) (Stmt' expr a) (Ann expr a) (Ann expr a) Source #

stmtBinds :: forall expr a. Partial (Stmt' expr a) (Stmt' expr a) (AnnList LocalBind a) (AnnList LocalBind a) Source #

cmdStmtBinds :: forall expr a. Partial (Stmt' expr a) (Stmt' expr a) (AnnList (Stmt' expr) a) (AnnList (Stmt' expr) a) Source #

thenExpr :: forall a. Partial (CompStmt a) (CompStmt a) (Ann Expr a) (Ann Expr a) Source #

compStmt :: forall a. Partial (CompStmt a) (CompStmt a) (Ann Stmt a) (Ann Stmt a) Source #

valBindRhs :: forall a. Partial (ValueBind a) (ValueBind a) (Ann Rhs a) (Ann Rhs a) Source #

patternType :: forall a. Partial (Pattern a) (Pattern a) (Ann Type a) (Ann Type a) Source #

patternName :: forall a. Partial (Pattern a) (Pattern a) (Ann Name a) (Ann Name a) Source #

patternExpr :: forall a. Partial (Pattern a) (Pattern a) (Ann Expr a) (Ann Expr a) Source #

spliceId :: forall a. Partial (Splice a) (Splice a) (Ann Name a) (Ann Name a) Source #

spliceExpr :: forall a. Partial (Splice a) (Splice a) (Ann Expr a) (Ann Expr a) Source #

matchRhs :: forall a. Lens (Match a) (Match a) (Ann Rhs a) (Ann Rhs a) Source #

matchLhs :: forall a. Lens (Match a) (Match a) (Ann MatchLhs a) (Ann MatchLhs a) Source #

altRhs :: forall expr a expr'. Lens (Alt' expr a) (Alt' expr' a) (Ann (CaseRhs' expr) a) (Ann (CaseRhs' expr') a) Source #

altPattern :: forall expr a. Lens (Alt' expr a) (Alt' expr a) (Ann Pattern a) (Ann Pattern a) Source #

altBinds :: forall expr a. Lens (Alt' expr a) (Alt' expr a) (AnnMaybe LocalBinds a) (AnnMaybe LocalBinds a) Source #

rhsExpr :: forall a. Partial (Rhs a) (Rhs a) (Ann Expr a) (Ann Expr a) Source #

guardExpr :: forall a. Lens (GuardedRhs a) (GuardedRhs a) (Ann Expr a) (Ann Expr a) Source #

bracketType :: forall a. Partial (Bracket a) (Bracket a) (Ann Type a) (Ann Type a) Source #

bracketExpr :: forall a. Partial (Bracket a) (Bracket a) (Ann Expr a) (Ann Expr a) Source #

ruleRhs :: forall a. Lens (Rule a) (Rule a) (Ann Expr a) (Ann Expr a) Source #

ruleName :: forall a. Lens (Rule a) (Rule a) (Ann StringNode a) (Ann StringNode a) Source #

ruleLhs :: forall a. Lens (Rule a) (Rule a) (Ann Expr a) (Ann Expr a) Source #

ruleBounded :: forall a. Lens (Rule a) (Rule a) (AnnList TyVar a) (AnnList TyVar a) Source #

qqExprName :: forall a. Lens (QuasiQuote a) (QuasiQuote a) (Ann Name a) (Ann Name a) Source #

guardRhs :: forall a. Partial (RhsGuard a) (RhsGuard a) (Ann Expr a) (Ann Expr a) Source #

guardCheck :: forall a. Partial (RhsGuard a) (RhsGuard a) (Ann Expr a) (Ann Expr a) Source #

tsType :: forall a. Lens (TypeSignature a) (TypeSignature a) (Ann Type a) (Ann Type a) Source #

tupSecExpr :: forall a a'. Partial (TupSecElem a) (TupSecElem a') (Ann Expr a) (Ann Expr a') Source #

rhsCaseGuards :: forall expr a. Partial (CaseRhs' expr a) (CaseRhs' expr a) (AnnList (GuardedCaseRhs' expr) a) (AnnList (GuardedCaseRhs' expr) a) Source #

rhsCaseExpr :: forall expr a. Partial (CaseRhs' expr a) (CaseRhs' expr a) (Ann expr a) (Ann expr a) Source #

caseGuardExpr :: forall expr a expr'. Lens (GuardedCaseRhs' expr a) (GuardedCaseRhs' expr' a) (Ann expr a) (Ann expr' a) Source #

patSynRhs :: forall a. Partial (PatSynLhs a) (PatSynLhs a) (Ann Name a) (Ann Name a) Source #

patSynLhs :: forall a. Partial (PatSynLhs a) (PatSynLhs a) (Ann Name a) (Ann Name a) Source #

patName :: forall a. Partial (PatSynLhs a) (PatSynLhs a) (Ann Name a) (Ann Name a) Source #

matchLhsName :: forall a. Partial (MatchLhs a) (MatchLhs a) (Ann Name a) (Ann Name a) Source #

promotedElements :: forall t a t'. Partial (Promoted t a) (Promoted t' a) (AnnList t a) (AnnList t' a) Source #

promotedConName :: forall t a. Partial (Promoted t a) (Promoted t a) (Ann Name a) (Ann Name a) Source #

simpleName :: forall a a'. Lens (Name a) (Name a') (Ann SimpleName a) (Ann SimpleName a') Source #

nameString :: SimpleName a -> String Source #

The occurrence of the name.

nameElements :: SimpleName a -> [String] Source #

The qualifiers and the unqualified name

nameQualifier :: SimpleName a -> [String] Source #

The qualifier of the name

importIsExact :: ImportDecl a -> Bool Source #

Does the import declaration import only the explicitly listed elements?

importIsHiding :: ImportDecl a -> Bool Source #

Does the import declaration has a hiding clause?

importExacts :: Simple Traversal (ImportDecl a) (IESpec a) Source #

All elements that are explicitly listed to be imported in the import declaration

importHidings :: Simple Traversal (ImportDecl a) (IESpec a) Source #

All elements that are hidden in an import

importQualifiers :: ImportDecl a -> [[String]] Source #

Possible qualifiers to use imported definitions

semantics :: Simple Lens (Ann a (NodeInfo sema src)) sema Source #

Access the semantic information of an AST node.

class BindingElem d where Source #

A type class for transformations that work on both top-level and local definitions

nodesContaining :: forall node inner a. (Biplate (node a) (inner a), HasAnnot node, HasAnnot inner, HasRange a) => RealSrcSpan -> Simple Traversal (node a) (inner a) Source #

isInside :: (HasAnnot node, HasRange a) => RealSrcSpan -> node a -> Bool Source #

nodesWithRange :: forall node inner a. (Biplate (node a) (inner a), HasAnnot node, HasAnnot inner, HasRange a) => RealSrcSpan -> Simple Traversal (node a) (inner a) Source #

hasRange :: (HasAnnot node, HasRange a) => RealSrcSpan -> node a -> Bool Source #

getNodeContaining :: (Biplate (node a) (Ann inner a), HasAnnot node, HasRange a) => RealSrcSpan -> node a -> Maybe (Ann inner a) Source #

getNode :: (Biplate (node a) (inner a), HasAnnot node, HasAnnot inner, HasRange a) => RealSrcSpan -> node a -> inner a Source #

ordSrcSpan :: SrcSpan -> OrdSrcSpan Source #

Wraps the SrcSpan into an ordered source span

fromOrdSrcSpan :: OrdSrcSpan -> SrcSpan Source #

Unwrap the ordered source span