Copyright | (c) 2009 Bernie Pope |
---|---|
License | BSD-style |
Maintainer | bjpop@csse.unimelb.edu.au |
Stability | experimental |
Portability | ghc |
Safe Haskell | Safe |
Language | Haskell2010 |
Language.Python.Common.AST
Description
Representation of the Python abstract syntax tree (AST). The representation is a superset of versions 2.x and 3.x of Python. In many cases they are identical. The documentation in this module indicates where they are different.
All the data types have a (polymorphic) parameter which allows the AST to
be annotated by an arbitrary type (for example source locations). Specialised
instances of the types are provided for source spans. For example Module a
is
the type of modules, and ModuleSpan
is the type of modules annoted with source
span information.
Note: there are cases where the AST is more liberal than the formal grammar of the language. Therefore some care must be taken when constructing Python programs using the raw AST.
Synopsis
- class Annotated t where
- annot :: t annot -> annot
- newtype Module annot = Module [Statement annot]
- type ModuleSpan = Module SrcSpan
- data Ident annot = Ident {
- ident_string :: !String
- ident_annot :: annot
- type IdentSpan = Ident SrcSpan
- type DottedName annot = [Ident annot]
- type DottedNameSpan = DottedName SrcSpan
- data Statement annot
- = Import {
- import_items :: [ImportItem annot]
- stmt_annot :: annot
- | FromImport {
- from_module :: ImportRelative annot
- from_items :: FromItems annot
- stmt_annot :: annot
- | While {
- while_cond :: Expr annot
- while_body :: Suite annot
- while_else :: Suite annot
- stmt_annot :: annot
- | For {
- for_targets :: [Expr annot]
- for_generator :: Expr annot
- for_body :: Suite annot
- for_else :: Suite annot
- stmt_annot :: annot
- | AsyncFor {
- for_stmt :: Statement annot
- stmt_annot :: annot
- | Fun {
- fun_name :: Ident annot
- fun_args :: [Parameter annot]
- fun_result_annotation :: Maybe (Expr annot)
- fun_body :: Suite annot
- stmt_annot :: annot
- | AsyncFun {
- fun_def :: Statement annot
- stmt_annot :: annot
- | Class {
- class_name :: Ident annot
- class_args :: [Argument annot]
- class_body :: Suite annot
- stmt_annot :: annot
- | Conditional {
- cond_guards :: [(Expr annot, Suite annot)]
- cond_else :: Suite annot
- stmt_annot :: annot
- | Assign {
- assign_to :: [Expr annot]
- assign_expr :: Expr annot
- stmt_annot :: annot
- | AugmentedAssign {
- aug_assign_to :: Expr annot
- aug_assign_op :: AssignOp annot
- aug_assign_expr :: Expr annot
- stmt_annot :: annot
- | AnnotatedAssign {
- ann_assign_annotation :: Expr annot
- ann_assign_to :: Expr annot
- ann_assign_expr :: Maybe (Expr annot)
- stmt_annot :: annot
- | Decorated {
- decorated_decorators :: [Decorator annot]
- decorated_def :: Statement annot
- stmt_annot :: annot
- | Return {
- return_expr :: Maybe (Expr annot)
- stmt_annot :: annot
- | Try {
- try_body :: Suite annot
- try_excepts :: [Handler annot]
- try_else :: Suite annot
- try_finally :: Suite annot
- stmt_annot :: annot
- | Raise {
- raise_expr :: RaiseExpr annot
- stmt_annot :: annot
- | With {
- with_context :: [(Expr annot, Maybe (Expr annot))]
- with_body :: Suite annot
- stmt_annot :: annot
- | AsyncWith {
- with_stmt :: Statement annot
- stmt_annot :: annot
- | Pass {
- stmt_annot :: annot
- | Break {
- stmt_annot :: annot
- | Continue {
- stmt_annot :: annot
- | Delete {
- del_exprs :: [Expr annot]
- stmt_annot :: annot
- | StmtExpr {
- stmt_expr :: Expr annot
- stmt_annot :: annot
- | Global {
- global_vars :: [Ident annot]
- stmt_annot :: annot
- | NonLocal {
- nonLocal_vars :: [Ident annot]
- stmt_annot :: annot
- | Assert {
- assert_exprs :: [Expr annot]
- stmt_annot :: annot
- | Print {
- print_chevron :: Bool
- print_exprs :: [Expr annot]
- print_trailing_comma :: Bool
- stmt_annot :: annot
- | Exec {
- exec_expr :: Expr annot
- exec_globals_locals :: Maybe (Expr annot, Maybe (Expr annot))
- stmt_annot :: annot
- = Import {
- type StatementSpan = Statement SrcSpan
- type Suite annot = [Statement annot]
- type SuiteSpan = Suite SrcSpan
- data Parameter annot
- = Param {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_default :: Maybe (Expr annot)
- param_annot :: annot
- | VarArgsPos {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_annot :: annot
- | VarArgsKeyword {
- param_name :: Ident annot
- param_py_annotation :: Maybe (Expr annot)
- param_annot :: annot
- | EndPositional {
- param_annot :: annot
- | UnPackTuple {
- param_unpack_tuple :: ParamTuple annot
- param_default :: Maybe (Expr annot)
- param_annot :: annot
- = Param {
- type ParameterSpan = Parameter SrcSpan
- data ParamTuple annot
- = ParamTupleName {
- param_tuple_name :: Ident annot
- param_tuple_annot :: annot
- | ParamTuple {
- param_tuple :: [ParamTuple annot]
- param_tuple_annot :: annot
- = ParamTupleName {
- type ParamTupleSpan = ParamTuple SrcSpan
- data Decorator annot = Decorator {
- decorator_name :: DottedName annot
- decorator_args :: [Argument annot]
- decorator_annot :: annot
- type DecoratorSpan = Decorator SrcSpan
- data AssignOp annot
- = PlusAssign {
- assignOp_annot :: annot
- | MinusAssign {
- assignOp_annot :: annot
- | MultAssign {
- assignOp_annot :: annot
- | DivAssign {
- assignOp_annot :: annot
- | ModAssign {
- assignOp_annot :: annot
- | PowAssign {
- assignOp_annot :: annot
- | BinAndAssign {
- assignOp_annot :: annot
- | BinOrAssign {
- assignOp_annot :: annot
- | BinXorAssign {
- assignOp_annot :: annot
- | LeftShiftAssign {
- assignOp_annot :: annot
- | RightShiftAssign {
- assignOp_annot :: annot
- | FloorDivAssign {
- assignOp_annot :: annot
- | MatrixMultAssign {
- assignOp_annot :: annot
- = PlusAssign {
- type AssignOpSpan = AssignOp SrcSpan
- data Expr annot
- = Var {
- var_ident :: Ident annot
- expr_annot :: annot
- | Int {
- int_value :: Integer
- expr_literal :: String
- expr_annot :: annot
- | LongInt {
- int_value :: Integer
- expr_literal :: String
- expr_annot :: annot
- | Float {
- float_value :: Double
- expr_literal :: String
- expr_annot :: annot
- | Imaginary {
- imaginary_value :: Double
- expr_literal :: String
- expr_annot :: annot
- | Bool {
- bool_value :: Bool
- expr_annot :: annot
- | None {
- expr_annot :: annot
- | Ellipsis {
- expr_annot :: annot
- | ByteStrings {
- byte_string_strings :: [String]
- expr_annot :: annot
- | Strings {
- strings_strings :: [String]
- expr_annot :: annot
- | UnicodeStrings {
- unicodestrings_strings :: [String]
- expr_annot :: annot
- | Call {
- call_fun :: Expr annot
- call_args :: [Argument annot]
- expr_annot :: annot
- | Subscript {
- subscriptee :: Expr annot
- subscript_expr :: Expr annot
- expr_annot :: annot
- | SlicedExpr {
- slicee :: Expr annot
- slices :: [Slice annot]
- expr_annot :: annot
- | CondExpr {
- ce_true_branch :: Expr annot
- ce_condition :: Expr annot
- ce_false_branch :: Expr annot
- expr_annot :: annot
- | BinaryOp {
- operator :: Op annot
- left_op_arg :: Expr annot
- right_op_arg :: Expr annot
- expr_annot :: annot
- | UnaryOp {
- operator :: Op annot
- op_arg :: Expr annot
- expr_annot :: annot
- | Dot {
- dot_expr :: Expr annot
- dot_attribute :: Ident annot
- expr_annot :: annot
- | Lambda {
- lambda_args :: [Parameter annot]
- lambda_body :: Expr annot
- expr_annot :: annot
- | Tuple {
- tuple_exprs :: [Expr annot]
- expr_annot :: annot
- | Yield {
- yield_arg :: Maybe (YieldArg annot)
- expr_annot :: annot
- | Generator {
- gen_comprehension :: Comprehension annot
- expr_annot :: annot
- | Await {
- await_expr :: Expr annot
- expr_annot :: annot
- | ListComp {
- list_comprehension :: Comprehension annot
- expr_annot :: annot
- | List {
- list_exprs :: [Expr annot]
- expr_annot :: annot
- | Dictionary {
- dict_mappings :: [DictKeyDatumList annot]
- expr_annot :: annot
- | DictComp {
- dict_comprehension :: Comprehension annot
- expr_annot :: annot
- | Set {
- set_exprs :: [Expr annot]
- expr_annot :: annot
- | SetComp {
- set_comprehension :: Comprehension annot
- expr_annot :: annot
- | Starred {
- starred_expr :: Expr annot
- expr_annot :: annot
- | Paren {
- paren_expr :: Expr annot
- expr_annot :: annot
- | StringConversion {
- backquoted_expr :: Expr annot
- expr_anot :: annot
- = Var {
- type ExprSpan = Expr SrcSpan
- data Op annot
- = And {
- op_annot :: annot
- | Or {
- op_annot :: annot
- | Not {
- op_annot :: annot
- | Exponent {
- op_annot :: annot
- | LessThan {
- op_annot :: annot
- | GreaterThan {
- op_annot :: annot
- | Equality {
- op_annot :: annot
- | GreaterThanEquals {
- op_annot :: annot
- | LessThanEquals {
- op_annot :: annot
- | NotEquals {
- op_annot :: annot
- | NotEqualsV2 {
- op_annot :: annot
- | In {
- op_annot :: annot
- | Is {
- op_annot :: annot
- | IsNot {
- op_annot :: annot
- | NotIn {
- op_annot :: annot
- | BinaryOr {
- op_annot :: annot
- | Xor {
- op_annot :: annot
- | BinaryAnd {
- op_annot :: annot
- | ShiftLeft {
- op_annot :: annot
- | ShiftRight {
- op_annot :: annot
- | Multiply {
- op_annot :: annot
- | Plus {
- op_annot :: annot
- | Minus {
- op_annot :: annot
- | Divide {
- op_annot :: annot
- | FloorDivide {
- op_annot :: annot
- | MatrixMult {
- op_annot :: annot
- | Invert {
- op_annot :: annot
- | Modulo {
- op_annot :: annot
- = And {
- type OpSpan = Op SrcSpan
- data Argument annot
- = ArgExpr { }
- | ArgVarArgsPos { }
- | ArgVarArgsKeyword { }
- | ArgKeyword {
- arg_keyword :: Ident annot
- arg_expr :: Expr annot
- arg_annot :: annot
- type ArgumentSpan = Argument SrcSpan
- data Slice annot
- = SliceProper {
- slice_lower :: Maybe (Expr annot)
- slice_upper :: Maybe (Expr annot)
- slice_stride :: Maybe (Maybe (Expr annot))
- slice_annot :: annot
- | SliceExpr {
- slice_expr :: Expr annot
- slice_annot :: annot
- | SliceEllipsis {
- slice_annot :: annot
- = SliceProper {
- type SliceSpan = Slice SrcSpan
- data DictKeyDatumList annot
- = DictMappingPair (Expr annot) (Expr annot)
- | DictUnpacking (Expr annot)
- type DictKeyDatumListSpan = DictKeyDatumList SrcSpan
- data YieldArg annot
- type YieldArgSpan = YieldArg SrcSpan
- data ImportItem annot = ImportItem {
- import_item_name :: DottedName annot
- import_as_name :: Maybe (Ident annot)
- import_item_annot :: annot
- type ImportItemSpan = ImportItem SrcSpan
- data FromItem annot = FromItem {
- from_item_name :: Ident annot
- from_as_name :: Maybe (Ident annot)
- from_item_annot :: annot
- type FromItemSpan = FromItem SrcSpan
- data FromItems annot
- = ImportEverything {
- from_items_annot :: annot
- | FromItems {
- from_items_items :: [FromItem annot]
- from_items_annot :: annot
- = ImportEverything {
- type FromItemsSpan = FromItems SrcSpan
- data ImportRelative annot = ImportRelative {
- import_relative_dots :: Int
- import_relative_module :: Maybe (DottedName annot)
- import_relative_annot :: annot
- type ImportRelativeSpan = ImportRelative SrcSpan
- data Handler annot = Handler {
- handler_clause :: ExceptClause annot
- handler_suite :: Suite annot
- handler_annot :: annot
- type HandlerSpan = Handler SrcSpan
- data ExceptClause annot = ExceptClause {
- except_clause :: Maybe (Expr annot, Maybe (Expr annot))
- except_clause_annot :: annot
- type ExceptClauseSpan = ExceptClause SrcSpan
- data RaiseExpr annot
- type RaiseExprSpan = RaiseExpr SrcSpan
- data Comprehension annot = Comprehension {
- comprehension_expr :: ComprehensionExpr annot
- comprehension_for :: CompFor annot
- comprehension_annot :: annot
- type ComprehensionSpan = Comprehension SrcSpan
- data ComprehensionExpr annot
- = ComprehensionExpr (Expr annot)
- | ComprehensionDict (DictKeyDatumList annot)
- type ComprehensionExprSpan = ComprehensionExpr SrcSpan
- data CompFor annot = CompFor {
- comp_for_async :: Bool
- comp_for_exprs :: [Expr annot]
- comp_in_expr :: Expr annot
- comp_for_iter :: Maybe (CompIter annot)
- comp_for_annot :: annot
- type CompForSpan = CompFor SrcSpan
- data CompIf annot = CompIf {
- comp_if :: Expr annot
- comp_if_iter :: Maybe (CompIter annot)
- comp_if_annot :: annot
- type CompIfSpan = CompIf SrcSpan
- data CompIter annot
- = IterFor {
- comp_iter_for :: CompFor annot
- comp_iter_annot :: annot
- | IterIf {
- comp_iter_if :: CompIf annot
- comp_iter_annot :: annot
- = IterFor {
- type CompIterSpan = CompIter SrcSpan
Annotation projection
class Annotated t where Source #
Convenient access to annotations in annotated types.
Instances
Modules
A module (Python source file).
Instances
Functor Module Source # | |
Eq annot => Eq (Module annot) Source # | |
Data annot => Data (Module annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Module annot -> c (Module annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Module annot) Source # toConstr :: Module annot -> Constr Source # dataTypeOf :: Module annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Module annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Module annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Module annot -> Module annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Module annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Module annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Module annot -> m (Module annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Module annot -> m (Module annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Module annot -> m (Module annot) Source # | |
Ord annot => Ord (Module annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Module annot -> Module annot -> Ordering Source # (<) :: Module annot -> Module annot -> Bool Source # (<=) :: Module annot -> Module annot -> Bool Source # (>) :: Module annot -> Module annot -> Bool Source # (>=) :: Module annot -> Module annot -> Bool Source # max :: Module annot -> Module annot -> Module annot Source # min :: Module annot -> Module annot -> Module annot Source # | |
Show annot => Show (Module annot) Source # | |
Pretty (Module a) Source # | |
type ModuleSpan = Module SrcSpan Source #
Identifiers and dotted names
Identifier.
Constructors
Ident | |
Fields
|
Instances
Functor Ident Source # | |
Span IdentSpan Source # | |
Annotated Ident Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Ident annot) Source # | |
Data annot => Data (Ident annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ident annot -> c (Ident annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ident annot) Source # toConstr :: Ident annot -> Constr Source # dataTypeOf :: Ident annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ident annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ident annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Ident annot -> Ident annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ident annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ident annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Ident annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Ident annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ident annot -> m (Ident annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ident annot -> m (Ident annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ident annot -> m (Ident annot) Source # | |
Ord annot => Ord (Ident annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Ident annot -> Ident annot -> Ordering Source # (<) :: Ident annot -> Ident annot -> Bool Source # (<=) :: Ident annot -> Ident annot -> Bool Source # (>) :: Ident annot -> Ident annot -> Bool Source # (>=) :: Ident annot -> Ident annot -> Bool Source # | |
Show annot => Show (Ident annot) Source # | |
Pretty (Ident a) Source # | |
type DottedName annot = [Ident annot] Source #
A compound name constructed with the dot operator.
type DottedNameSpan = DottedName SrcSpan Source #
Statements, suites, parameters, decorators and assignment operators
Statements.
- Simple statements:
- Version 2.6 http://docs.python.org/2.6/reference/simple_stmts.html
- Version 3.1 http://docs.python.org/3.1/reference/simple_stmts.html
- Compound statements:
- Version 2.6 http://docs.python.org/2.6/reference/compound_stmts.html
- Version 3.1 http://docs.python.org/3.1/reference/compound_stmts.html
Constructors
Import | Import statement. |
Fields
| |
FromImport | From ... import statement. |
Fields
| |
While | While loop. |
Fields
| |
For | For loop. |
Fields
| |
AsyncFor | |
Fields
| |
Fun | Function definition. |
Fields
| |
AsyncFun | |
Fields
| |
Class | Class definition. |
Fields
| |
Conditional | Conditional statement (if-elif-else). |
Fields
| |
Assign | Assignment statement. |
Fields
| |
AugmentedAssign | Augmented assignment statement. |
Fields
| |
AnnotatedAssign | |
Fields
| |
Decorated | Decorated definition of a function or class. |
Fields
| |
Return | Return statement (may only occur syntactically nested in a function definition). |
Fields
| |
Try | Try statement (exception handling). |
Fields
| |
Raise | Raise statement (exception throwing). |
Fields
| |
With | With statement (context management). |
Fields
| |
AsyncWith | |
Fields
| |
Pass | Pass statement (null operation). |
Fields
| |
Break | Break statement (may only occur syntactically nested in a for or while loop, but not nested in a function or class definition within that loop). |
Fields
| |
Continue | Continue statement (may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally clause within that loop). |
Fields
| |
Delete | Del statement (delete). |
Fields
| |
StmtExpr | Expression statement. |
Fields
| |
Global | Global declaration. |
Fields
| |
NonLocal | Nonlocal declaration. Version 3.x only. |
Fields
| |
Assert | Assertion. |
Fields
| |
Print statement. Version 2 only. | |
Fields
| |
Exec | Exec statement. Version 2 only. |
Fields
|
Instances
Functor Statement Source # | |
Span StatementSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: StatementSpan -> SrcSpan Source # | |
Annotated Statement Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Statement annot) Source # | |
Data annot => Data (Statement annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Statement annot -> c (Statement annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Statement annot) Source # toConstr :: Statement annot -> Constr Source # dataTypeOf :: Statement annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Statement annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Statement annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Statement annot -> Statement annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Statement annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Statement annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Statement annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Statement annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Statement annot -> m (Statement annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Statement annot -> m (Statement annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Statement annot -> m (Statement annot) Source # | |
Ord annot => Ord (Statement annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Statement annot -> Statement annot -> Ordering Source # (<) :: Statement annot -> Statement annot -> Bool Source # (<=) :: Statement annot -> Statement annot -> Bool Source # (>) :: Statement annot -> Statement annot -> Bool Source # (>=) :: Statement annot -> Statement annot -> Bool Source # max :: Statement annot -> Statement annot -> Statement annot Source # min :: Statement annot -> Statement annot -> Statement annot Source # | |
Show annot => Show (Statement annot) Source # | |
Pretty (Statement a) Source # | |
type StatementSpan = Statement SrcSpan Source #
type Suite annot = [Statement annot] Source #
A block of statements. A suite is a group of statements controlled by a clause, for example, the body of a loop.
Formal parameter of function definitions and lambda expressions.
Constructors
Param | Ordinary named parameter. |
Fields
| |
VarArgsPos | Excess positional parameter (single asterisk before its name in the concrete syntax). |
Fields
| |
VarArgsKeyword | Excess keyword parameter (double asterisk before its name in the concrete syntax). |
Fields
| |
EndPositional | Marker for the end of positional parameters (not a parameter itself). |
Fields
| |
UnPackTuple | Tuple unpack. Version 2 only. |
Fields
|
Instances
Functor Parameter Source # | |
Span ParameterSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: ParameterSpan -> SrcSpan Source # | |
Annotated Parameter Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Parameter annot) Source # | |
Data annot => Data (Parameter annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parameter annot -> c (Parameter annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Parameter annot) Source # toConstr :: Parameter annot -> Constr Source # dataTypeOf :: Parameter annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Parameter annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Parameter annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Parameter annot -> Parameter annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parameter annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parameter annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Parameter annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Parameter annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parameter annot -> m (Parameter annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter annot -> m (Parameter annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parameter annot -> m (Parameter annot) Source # | |
Ord annot => Ord (Parameter annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Parameter annot -> Parameter annot -> Ordering Source # (<) :: Parameter annot -> Parameter annot -> Bool Source # (<=) :: Parameter annot -> Parameter annot -> Bool Source # (>) :: Parameter annot -> Parameter annot -> Bool Source # (>=) :: Parameter annot -> Parameter annot -> Bool Source # max :: Parameter annot -> Parameter annot -> Parameter annot Source # min :: Parameter annot -> Parameter annot -> Parameter annot Source # | |
Show annot => Show (Parameter annot) Source # | |
Pretty (Parameter a) Source # | |
type ParameterSpan = Parameter SrcSpan Source #
data ParamTuple annot Source #
Tuple unpack parameter. Version 2 only.
Constructors
ParamTupleName | A variable name. |
Fields
| |
ParamTuple | A (possibly nested) tuple parameter. |
Fields
|
Instances
Functor ParamTuple Source # | |
Defined in Language.Python.Common.AST Methods fmap :: (a -> b) -> ParamTuple a -> ParamTuple b Source # (<$) :: a -> ParamTuple b -> ParamTuple a Source # | |
Span ParamTupleSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: ParamTupleSpan -> SrcSpan Source # | |
Annotated ParamTuple Source # | |
Defined in Language.Python.Common.AST Methods annot :: ParamTuple annot -> annot Source # | |
Eq annot => Eq (ParamTuple annot) Source # | |
Defined in Language.Python.Common.AST Methods (==) :: ParamTuple annot -> ParamTuple annot -> Bool Source # (/=) :: ParamTuple annot -> ParamTuple annot -> Bool Source # | |
Data annot => Data (ParamTuple annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParamTuple annot -> c (ParamTuple annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParamTuple annot) Source # toConstr :: ParamTuple annot -> Constr Source # dataTypeOf :: ParamTuple annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ParamTuple annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParamTuple annot)) Source # gmapT :: (forall b. Data b => b -> b) -> ParamTuple annot -> ParamTuple annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParamTuple annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParamTuple annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ParamTuple annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParamTuple annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParamTuple annot -> m (ParamTuple annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParamTuple annot -> m (ParamTuple annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParamTuple annot -> m (ParamTuple annot) Source # | |
Ord annot => Ord (ParamTuple annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: ParamTuple annot -> ParamTuple annot -> Ordering Source # (<) :: ParamTuple annot -> ParamTuple annot -> Bool Source # (<=) :: ParamTuple annot -> ParamTuple annot -> Bool Source # (>) :: ParamTuple annot -> ParamTuple annot -> Bool Source # (>=) :: ParamTuple annot -> ParamTuple annot -> Bool Source # max :: ParamTuple annot -> ParamTuple annot -> ParamTuple annot Source # min :: ParamTuple annot -> ParamTuple annot -> ParamTuple annot Source # | |
Show annot => Show (ParamTuple annot) Source # | |
Defined in Language.Python.Common.AST | |
Pretty (ParamTuple a) Source # | |
Defined in Language.Python.Common.PrettyAST Methods pretty :: ParamTuple a -> Doc Source # |
type ParamTupleSpan = ParamTuple SrcSpan Source #
Decorator.
Constructors
Decorator | |
Fields
|
Instances
Functor Decorator Source # | |
Span DecoratorSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: DecoratorSpan -> SrcSpan Source # | |
Annotated Decorator Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Decorator annot) Source # | |
Data annot => Data (Decorator annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Decorator annot -> c (Decorator annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Decorator annot) Source # toConstr :: Decorator annot -> Constr Source # dataTypeOf :: Decorator annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Decorator annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Decorator annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Decorator annot -> Decorator annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decorator annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decorator annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Decorator annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Decorator annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Decorator annot -> m (Decorator annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Decorator annot -> m (Decorator annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Decorator annot -> m (Decorator annot) Source # | |
Ord annot => Ord (Decorator annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Decorator annot -> Decorator annot -> Ordering Source # (<) :: Decorator annot -> Decorator annot -> Bool Source # (<=) :: Decorator annot -> Decorator annot -> Bool Source # (>) :: Decorator annot -> Decorator annot -> Bool Source # (>=) :: Decorator annot -> Decorator annot -> Bool Source # max :: Decorator annot -> Decorator annot -> Decorator annot Source # min :: Decorator annot -> Decorator annot -> Decorator annot Source # | |
Show annot => Show (Decorator annot) Source # | |
Pretty (Decorator a) Source # | |
type DecoratorSpan = Decorator SrcSpan Source #
Augmented assignment operators.
Constructors
PlusAssign | '+=' |
Fields
| |
MinusAssign | '-=' |
Fields
| |
MultAssign | '*=' |
Fields
| |
DivAssign | '/=' |
Fields
| |
ModAssign | '%=' |
Fields
| |
PowAssign | '*=' |
Fields
| |
BinAndAssign | '&=' |
Fields
| |
BinOrAssign | '|=' |
Fields
| |
BinXorAssign | '^=' |
Fields
| |
LeftShiftAssign | '<<=' |
Fields
| |
RightShiftAssign | '>>=' |
Fields
| |
FloorDivAssign | '//=' |
Fields
| |
MatrixMultAssign | '@=' |
Fields
|
Instances
Functor AssignOp Source # | |
Span AssignOpSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: AssignOpSpan -> SrcSpan Source # | |
Annotated AssignOp Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (AssignOp annot) Source # | |
Data annot => Data (AssignOp annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AssignOp annot -> c (AssignOp annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AssignOp annot) Source # toConstr :: AssignOp annot -> Constr Source # dataTypeOf :: AssignOp annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AssignOp annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AssignOp annot)) Source # gmapT :: (forall b. Data b => b -> b) -> AssignOp annot -> AssignOp annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AssignOp annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AssignOp annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AssignOp annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AssignOp annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AssignOp annot -> m (AssignOp annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AssignOp annot -> m (AssignOp annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AssignOp annot -> m (AssignOp annot) Source # | |
Ord annot => Ord (AssignOp annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: AssignOp annot -> AssignOp annot -> Ordering Source # (<) :: AssignOp annot -> AssignOp annot -> Bool Source # (<=) :: AssignOp annot -> AssignOp annot -> Bool Source # (>) :: AssignOp annot -> AssignOp annot -> Bool Source # (>=) :: AssignOp annot -> AssignOp annot -> Bool Source # max :: AssignOp annot -> AssignOp annot -> AssignOp annot Source # min :: AssignOp annot -> AssignOp annot -> AssignOp annot Source # | |
Show annot => Show (AssignOp annot) Source # | |
Pretty (AssignOp a) Source # | |
type AssignOpSpan = AssignOp SrcSpan Source #
Expressions, operators, arguments and slices
Expressions.
Constructors
Var | Variable. |
Fields
| |
Int | Literal integer. |
Fields
| |
LongInt | Long literal integer. Version 2 only. |
Fields
| |
Float | Literal floating point number. |
Fields
| |
Imaginary | Literal imaginary number. |
Fields
| |
Bool | Literal boolean. |
Fields
| |
None | Literal 'None' value. |
Fields
| |
Ellipsis | Ellipsis '...'. |
Fields
| |
ByteStrings | Literal byte string. |
Fields
| |
Strings | Literal strings (to be concatentated together). |
Fields
| |
UnicodeStrings | Unicode literal strings (to be concatentated together). Version 2 only. |
Fields
| |
Call | Function call. |
Fields
| |
Subscript | Subscription, for example 'x [y]'. |
Fields
| |
SlicedExpr | Slicing, for example 'w [x:y:z]'. |
Fields
| |
CondExpr | Conditional expresison. |
Fields
| |
BinaryOp | Binary operator application. |
Fields
| |
UnaryOp | Unary operator application. |
Fields
| |
Dot | |
Fields
| |
Lambda | Anonymous function definition (lambda). |
Fields
| |
Tuple | Tuple. Can be empty. |
Fields
| |
Yield | Generator yield. |
Fields
| |
Generator | Generator. |
Fields
| |
Await | Await |
Fields
| |
ListComp | List comprehension. |
Fields
| |
List | List. |
Fields
| |
Dictionary | Dictionary. |
Fields
| |
DictComp | Dictionary comprehension. Version 3 only. |
Fields
| |
Set | Set. |
Fields
| |
SetComp | Set comprehension. Version 3 only. |
Fields
| |
Starred | Starred expression. Version 3 only. |
Fields
| |
Paren | Parenthesised expression. |
Fields
| |
StringConversion | String conversion (backquoted expression). Version 2 only. |
Fields
|
Instances
Functor Expr Source # | |
Span ExprSpan Source # | |
Annotated Expr Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Expr annot) Source # | |
Data annot => Data (Expr annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expr annot -> c (Expr annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr annot) Source # toConstr :: Expr annot -> Constr Source # dataTypeOf :: Expr annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Expr annot -> Expr annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Expr annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr annot -> m (Expr annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr annot -> m (Expr annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr annot -> m (Expr annot) Source # | |
Ord annot => Ord (Expr annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Expr annot -> Expr annot -> Ordering Source # (<) :: Expr annot -> Expr annot -> Bool Source # (<=) :: Expr annot -> Expr annot -> Bool Source # (>) :: Expr annot -> Expr annot -> Bool Source # (>=) :: Expr annot -> Expr annot -> Bool Source # | |
Show annot => Show (Expr annot) Source # | |
Pretty (Expr a) Source # | |
Operators.
Constructors
And | 'and' |
Fields
| |
Or | 'or' |
Fields
| |
Not | 'not' |
Fields
| |
Exponent | '**' |
Fields
| |
LessThan | '<' |
Fields
| |
GreaterThan | '>' |
Fields
| |
Equality | '==' |
Fields
| |
GreaterThanEquals | '>=' |
Fields
| |
LessThanEquals | '<=' |
Fields
| |
NotEquals | '!=' |
Fields
| |
NotEqualsV2 | '<>'. Version 2 only. |
Fields
| |
In | 'in' |
Fields
| |
Is | 'is' |
Fields
| |
IsNot | 'is not' |
Fields
| |
NotIn | 'not in' |
Fields
| |
BinaryOr | '|' |
Fields
| |
Xor | '^' |
Fields
| |
BinaryAnd | '&' |
Fields
| |
ShiftLeft | '<<' |
Fields
| |
ShiftRight | '>>' |
Fields
| |
Multiply | '*' |
Fields
| |
Plus | '+' |
Fields
| |
Minus | '-' |
Fields
| |
Divide | '/' |
Fields
| |
FloorDivide | '//' |
Fields
| |
MatrixMult | '@' |
Fields
| |
Invert | '~' (bitwise inversion of its integer argument) |
Fields
| |
Modulo | '%' |
Fields
|
Instances
Functor Op Source # | |
Span OpSpan Source # | |
Annotated Op Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Op annot) Source # | |
Data annot => Data (Op annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Op annot -> c (Op annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Op annot) Source # toConstr :: Op annot -> Constr Source # dataTypeOf :: Op annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Op annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Op annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Op annot -> Op annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Op annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Op annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Op annot -> m (Op annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Op annot -> m (Op annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Op annot -> m (Op annot) Source # | |
Ord annot => Ord (Op annot) Source # | |
Defined in Language.Python.Common.AST | |
Show annot => Show (Op annot) Source # | |
Pretty (Op a) Source # | |
Arguments to function calls, class declarations and decorators.
Constructors
ArgExpr | Ordinary argument expression. |
ArgVarArgsPos | Excess positional argument. |
ArgVarArgsKeyword | Excess keyword argument. |
ArgKeyword | Keyword argument. |
Fields
|
Instances
Functor Argument Source # | |
Span ArgumentSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: ArgumentSpan -> SrcSpan Source # | |
Annotated Argument Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Argument annot) Source # | |
Data annot => Data (Argument annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Argument annot -> c (Argument annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Argument annot) Source # toConstr :: Argument annot -> Constr Source # dataTypeOf :: Argument annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Argument annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Argument annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Argument annot -> Argument annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Argument annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Argument annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Argument annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Argument annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Argument annot -> m (Argument annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Argument annot -> m (Argument annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Argument annot -> m (Argument annot) Source # | |
Ord annot => Ord (Argument annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Argument annot -> Argument annot -> Ordering Source # (<) :: Argument annot -> Argument annot -> Bool Source # (<=) :: Argument annot -> Argument annot -> Bool Source # (>) :: Argument annot -> Argument annot -> Bool Source # (>=) :: Argument annot -> Argument annot -> Bool Source # max :: Argument annot -> Argument annot -> Argument annot Source # min :: Argument annot -> Argument annot -> Argument annot Source # | |
Show annot => Show (Argument annot) Source # | |
Pretty (Argument a) Source # | |
type ArgumentSpan = Argument SrcSpan Source #
Slice compenent.
Constructors
SliceProper | |
Fields
| |
SliceExpr | |
Fields
| |
SliceEllipsis | |
Fields
|
Instances
Functor Slice Source # | |
Span SliceSpan Source # | |
Annotated Slice Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Slice annot) Source # | |
Data annot => Data (Slice annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Slice annot -> c (Slice annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Slice annot) Source # toConstr :: Slice annot -> Constr Source # dataTypeOf :: Slice annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Slice annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Slice annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Slice annot -> Slice annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Slice annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Slice annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Slice annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Slice annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Slice annot -> m (Slice annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Slice annot -> m (Slice annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Slice annot -> m (Slice annot) Source # | |
Ord annot => Ord (Slice annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Slice annot -> Slice annot -> Ordering Source # (<) :: Slice annot -> Slice annot -> Bool Source # (<=) :: Slice annot -> Slice annot -> Bool Source # (>) :: Slice annot -> Slice annot -> Bool Source # (>=) :: Slice annot -> Slice annot -> Bool Source # | |
Show annot => Show (Slice annot) Source # | |
Pretty (Slice a) Source # | |
data DictKeyDatumList annot Source #
Constructors
DictMappingPair (Expr annot) (Expr annot) | |
DictUnpacking (Expr annot) |
Instances
Constructors
YieldFrom (Expr annot) annot | Yield from a generator (Version 3 only) |
YieldExpr (Expr annot) | Yield value of an expression |
Instances
Functor YieldArg Source # | |
Span YieldArgSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: YieldArgSpan -> SrcSpan Source # | |
Eq annot => Eq (YieldArg annot) Source # | |
Data annot => Data (YieldArg annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> YieldArg annot -> c (YieldArg annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (YieldArg annot) Source # toConstr :: YieldArg annot -> Constr Source # dataTypeOf :: YieldArg annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (YieldArg annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (YieldArg annot)) Source # gmapT :: (forall b. Data b => b -> b) -> YieldArg annot -> YieldArg annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> YieldArg annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> YieldArg annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> YieldArg annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> YieldArg annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> YieldArg annot -> m (YieldArg annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> YieldArg annot -> m (YieldArg annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> YieldArg annot -> m (YieldArg annot) Source # | |
Ord annot => Ord (YieldArg annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: YieldArg annot -> YieldArg annot -> Ordering Source # (<) :: YieldArg annot -> YieldArg annot -> Bool Source # (<=) :: YieldArg annot -> YieldArg annot -> Bool Source # (>) :: YieldArg annot -> YieldArg annot -> Bool Source # (>=) :: YieldArg annot -> YieldArg annot -> Bool Source # max :: YieldArg annot -> YieldArg annot -> YieldArg annot Source # min :: YieldArg annot -> YieldArg annot -> YieldArg annot Source # | |
Show annot => Show (YieldArg annot) Source # | |
Pretty (YieldArg a) Source # | |
type YieldArgSpan = YieldArg SrcSpan Source #
Imports
data ImportItem annot Source #
An entity imported using the 'import' keyword.
Constructors
ImportItem | |
Fields
|
Instances
Functor ImportItem Source # | |
Defined in Language.Python.Common.AST Methods fmap :: (a -> b) -> ImportItem a -> ImportItem b Source # (<$) :: a -> ImportItem b -> ImportItem a Source # | |
Span ImportItemSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: ImportItemSpan -> SrcSpan Source # | |
Annotated ImportItem Source # | |
Defined in Language.Python.Common.AST Methods annot :: ImportItem annot -> annot Source # | |
Eq annot => Eq (ImportItem annot) Source # | |
Defined in Language.Python.Common.AST Methods (==) :: ImportItem annot -> ImportItem annot -> Bool Source # (/=) :: ImportItem annot -> ImportItem annot -> Bool Source # | |
Data annot => Data (ImportItem annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportItem annot -> c (ImportItem annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ImportItem annot) Source # toConstr :: ImportItem annot -> Constr Source # dataTypeOf :: ImportItem annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ImportItem annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ImportItem annot)) Source # gmapT :: (forall b. Data b => b -> b) -> ImportItem annot -> ImportItem annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportItem annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportItem annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ImportItem annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportItem annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportItem annot -> m (ImportItem annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportItem annot -> m (ImportItem annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportItem annot -> m (ImportItem annot) Source # | |
Ord annot => Ord (ImportItem annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: ImportItem annot -> ImportItem annot -> Ordering Source # (<) :: ImportItem annot -> ImportItem annot -> Bool Source # (<=) :: ImportItem annot -> ImportItem annot -> Bool Source # (>) :: ImportItem annot -> ImportItem annot -> Bool Source # (>=) :: ImportItem annot -> ImportItem annot -> Bool Source # max :: ImportItem annot -> ImportItem annot -> ImportItem annot Source # min :: ImportItem annot -> ImportItem annot -> ImportItem annot Source # | |
Show annot => Show (ImportItem annot) Source # | |
Defined in Language.Python.Common.AST | |
Pretty (ImportItem a) Source # | |
Defined in Language.Python.Common.PrettyAST Methods pretty :: ImportItem a -> Doc Source # |
type ImportItemSpan = ImportItem SrcSpan Source #
An entity imported using the 'from ... import' construct.
Constructors
FromItem | |
Fields
|
Instances
Functor FromItem Source # | |
Span FromItemSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: FromItemSpan -> SrcSpan Source # | |
Annotated FromItem Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (FromItem annot) Source # | |
Data annot => Data (FromItem annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FromItem annot -> c (FromItem annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FromItem annot) Source # toConstr :: FromItem annot -> Constr Source # dataTypeOf :: FromItem annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FromItem annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FromItem annot)) Source # gmapT :: (forall b. Data b => b -> b) -> FromItem annot -> FromItem annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FromItem annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FromItem annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FromItem annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FromItem annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FromItem annot -> m (FromItem annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FromItem annot -> m (FromItem annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FromItem annot -> m (FromItem annot) Source # | |
Ord annot => Ord (FromItem annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: FromItem annot -> FromItem annot -> Ordering Source # (<) :: FromItem annot -> FromItem annot -> Bool Source # (<=) :: FromItem annot -> FromItem annot -> Bool Source # (>) :: FromItem annot -> FromItem annot -> Bool Source # (>=) :: FromItem annot -> FromItem annot -> Bool Source # max :: FromItem annot -> FromItem annot -> FromItem annot Source # min :: FromItem annot -> FromItem annot -> FromItem annot Source # | |
Show annot => Show (FromItem annot) Source # | |
Pretty (FromItem a) Source # | |
type FromItemSpan = FromItem SrcSpan Source #
Items imported using the 'from ... import' construct.
Constructors
ImportEverything | Import everything exported from the module. |
Fields
| |
FromItems | Import a specific list of items from the module. |
Fields
|
Instances
Functor FromItems Source # | |
Span FromItemsSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: FromItemsSpan -> SrcSpan Source # | |
Annotated FromItems Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (FromItems annot) Source # | |
Data annot => Data (FromItems annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FromItems annot -> c (FromItems annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FromItems annot) Source # toConstr :: FromItems annot -> Constr Source # dataTypeOf :: FromItems annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FromItems annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FromItems annot)) Source # gmapT :: (forall b. Data b => b -> b) -> FromItems annot -> FromItems annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FromItems annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FromItems annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FromItems annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FromItems annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FromItems annot -> m (FromItems annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FromItems annot -> m (FromItems annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FromItems annot -> m (FromItems annot) Source # | |
Ord annot => Ord (FromItems annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: FromItems annot -> FromItems annot -> Ordering Source # (<) :: FromItems annot -> FromItems annot -> Bool Source # (<=) :: FromItems annot -> FromItems annot -> Bool Source # (>) :: FromItems annot -> FromItems annot -> Bool Source # (>=) :: FromItems annot -> FromItems annot -> Bool Source # max :: FromItems annot -> FromItems annot -> FromItems annot Source # min :: FromItems annot -> FromItems annot -> FromItems annot Source # | |
Show annot => Show (FromItems annot) Source # | |
Pretty (FromItems a) Source # | |
type FromItemsSpan = FromItems SrcSpan Source #
data ImportRelative annot Source #
A reference to the module to import from using the 'from ... import' construct.
Constructors
ImportRelative | |
Fields
|
Instances
Exceptions
Exception handler.
Constructors
Handler | |
Fields
|
Instances
Functor Handler Source # | |
Span HandlerSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: HandlerSpan -> SrcSpan Source # | |
Annotated Handler Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (Handler annot) Source # | |
Data annot => Data (Handler annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Handler annot -> c (Handler annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Handler annot) Source # toConstr :: Handler annot -> Constr Source # dataTypeOf :: Handler annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Handler annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Handler annot)) Source # gmapT :: (forall b. Data b => b -> b) -> Handler annot -> Handler annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Handler annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Handler annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Handler annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Handler annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Handler annot -> m (Handler annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Handler annot -> m (Handler annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Handler annot -> m (Handler annot) Source # | |
Ord annot => Ord (Handler annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: Handler annot -> Handler annot -> Ordering Source # (<) :: Handler annot -> Handler annot -> Bool Source # (<=) :: Handler annot -> Handler annot -> Bool Source # (>) :: Handler annot -> Handler annot -> Bool Source # (>=) :: Handler annot -> Handler annot -> Bool Source # max :: Handler annot -> Handler annot -> Handler annot Source # min :: Handler annot -> Handler annot -> Handler annot Source # | |
Show annot => Show (Handler annot) Source # | |
Pretty (Handler a) Source # | |
type HandlerSpan = Handler SrcSpan Source #
data ExceptClause annot Source #
Exception clause.
Constructors
ExceptClause | |
Fields
|
Instances
type ExceptClauseSpan = ExceptClause SrcSpan Source #
The argument for a raise
statement.
Constructors
RaiseV3 (Maybe (Expr annot, Maybe (Expr annot))) | Optional expression to evaluate, and optional 'from' clause. Version 3 only. |
RaiseV2 (Maybe (Expr annot, Maybe (Expr annot, Maybe (Expr annot)))) | Version 2 only. |
Instances
Functor RaiseExpr Source # | |
Eq annot => Eq (RaiseExpr annot) Source # | |
Data annot => Data (RaiseExpr annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RaiseExpr annot -> c (RaiseExpr annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RaiseExpr annot) Source # toConstr :: RaiseExpr annot -> Constr Source # dataTypeOf :: RaiseExpr annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RaiseExpr annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RaiseExpr annot)) Source # gmapT :: (forall b. Data b => b -> b) -> RaiseExpr annot -> RaiseExpr annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RaiseExpr annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RaiseExpr annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RaiseExpr annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RaiseExpr annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RaiseExpr annot -> m (RaiseExpr annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RaiseExpr annot -> m (RaiseExpr annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RaiseExpr annot -> m (RaiseExpr annot) Source # | |
Ord annot => Ord (RaiseExpr annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: RaiseExpr annot -> RaiseExpr annot -> Ordering Source # (<) :: RaiseExpr annot -> RaiseExpr annot -> Bool Source # (<=) :: RaiseExpr annot -> RaiseExpr annot -> Bool Source # (>) :: RaiseExpr annot -> RaiseExpr annot -> Bool Source # (>=) :: RaiseExpr annot -> RaiseExpr annot -> Bool Source # max :: RaiseExpr annot -> RaiseExpr annot -> RaiseExpr annot Source # min :: RaiseExpr annot -> RaiseExpr annot -> RaiseExpr annot Source # | |
Show annot => Show (RaiseExpr annot) Source # | |
Pretty (RaiseExpr a) Source # | |
type RaiseExprSpan = RaiseExpr SrcSpan Source #
Comprehensions
data Comprehension annot Source #
Comprehension. In version 3.x this can be used for lists, sets, dictionaries and generators. data Comprehension e annot
Constructors
Comprehension | |
Fields
|
Instances
type ComprehensionSpan = Comprehension SrcSpan Source #
data ComprehensionExpr annot Source #
Constructors
ComprehensionExpr (Expr annot) | |
ComprehensionDict (DictKeyDatumList annot) |
Instances
Comprehension 'for' component.
Constructors
CompFor | |
Fields
|
Instances
Functor CompFor Source # | |
Span CompForSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: CompForSpan -> SrcSpan Source # | |
Annotated CompFor Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (CompFor annot) Source # | |
Data annot => Data (CompFor annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CompFor annot -> c (CompFor annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CompFor annot) Source # toConstr :: CompFor annot -> Constr Source # dataTypeOf :: CompFor annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CompFor annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CompFor annot)) Source # gmapT :: (forall b. Data b => b -> b) -> CompFor annot -> CompFor annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CompFor annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CompFor annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CompFor annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CompFor annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CompFor annot -> m (CompFor annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CompFor annot -> m (CompFor annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CompFor annot -> m (CompFor annot) Source # | |
Ord annot => Ord (CompFor annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: CompFor annot -> CompFor annot -> Ordering Source # (<) :: CompFor annot -> CompFor annot -> Bool Source # (<=) :: CompFor annot -> CompFor annot -> Bool Source # (>) :: CompFor annot -> CompFor annot -> Bool Source # (>=) :: CompFor annot -> CompFor annot -> Bool Source # max :: CompFor annot -> CompFor annot -> CompFor annot Source # min :: CompFor annot -> CompFor annot -> CompFor annot Source # | |
Show annot => Show (CompFor annot) Source # | |
Pretty (CompFor a) Source # | |
type CompForSpan = CompFor SrcSpan Source #
Comprehension guard.
Constructors
CompIf | |
Fields
|
Instances
Functor CompIf Source # | |
Span CompIfSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: CompIfSpan -> SrcSpan Source # | |
Annotated CompIf Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (CompIf annot) Source # | |
Data annot => Data (CompIf annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CompIf annot -> c (CompIf annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CompIf annot) Source # toConstr :: CompIf annot -> Constr Source # dataTypeOf :: CompIf annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CompIf annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CompIf annot)) Source # gmapT :: (forall b. Data b => b -> b) -> CompIf annot -> CompIf annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CompIf annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CompIf annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CompIf annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CompIf annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CompIf annot -> m (CompIf annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CompIf annot -> m (CompIf annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CompIf annot -> m (CompIf annot) Source # | |
Ord annot => Ord (CompIf annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: CompIf annot -> CompIf annot -> Ordering Source # (<) :: CompIf annot -> CompIf annot -> Bool Source # (<=) :: CompIf annot -> CompIf annot -> Bool Source # (>) :: CompIf annot -> CompIf annot -> Bool Source # (>=) :: CompIf annot -> CompIf annot -> Bool Source # max :: CompIf annot -> CompIf annot -> CompIf annot Source # min :: CompIf annot -> CompIf annot -> CompIf annot Source # | |
Show annot => Show (CompIf annot) Source # | |
Pretty (CompIf a) Source # | |
type CompIfSpan = CompIf SrcSpan Source #
Comprehension iterator (either a 'for' or an 'if').
Constructors
IterFor | |
Fields
| |
IterIf | |
Fields
|
Instances
Functor CompIter Source # | |
Span CompIterSpan Source # | |
Defined in Language.Python.Common.AST Methods getSpan :: CompIterSpan -> SrcSpan Source # | |
Annotated CompIter Source # | |
Defined in Language.Python.Common.AST | |
Eq annot => Eq (CompIter annot) Source # | |
Data annot => Data (CompIter annot) Source # | |
Defined in Language.Python.Common.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CompIter annot -> c (CompIter annot) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CompIter annot) Source # toConstr :: CompIter annot -> Constr Source # dataTypeOf :: CompIter annot -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CompIter annot)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CompIter annot)) Source # gmapT :: (forall b. Data b => b -> b) -> CompIter annot -> CompIter annot Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CompIter annot -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CompIter annot -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CompIter annot -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CompIter annot -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CompIter annot -> m (CompIter annot) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CompIter annot -> m (CompIter annot) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CompIter annot -> m (CompIter annot) Source # | |
Ord annot => Ord (CompIter annot) Source # | |
Defined in Language.Python.Common.AST Methods compare :: CompIter annot -> CompIter annot -> Ordering Source # (<) :: CompIter annot -> CompIter annot -> Bool Source # (<=) :: CompIter annot -> CompIter annot -> Bool Source # (>) :: CompIter annot -> CompIter annot -> Bool Source # (>=) :: CompIter annot -> CompIter annot -> Bool Source # max :: CompIter annot -> CompIter annot -> CompIter annot Source # min :: CompIter annot -> CompIter annot -> CompIter annot Source # | |
Show annot => Show (CompIter annot) Source # | |
Pretty (CompIter a) Source # | |
type CompIterSpan = CompIter SrcSpan Source #