hpython-0.2: Python language tools

Copyright(C) CSIRO 2017-2019
LicenseBSD3
MaintainerIsaac Elliott <isaace71295@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Language.Python.Syntax.Ann

Description

 
Synopsis

Documentation

newtype Ann a Source #

Used to mark annotations in data structures, which helps with generic deriving

Constructors

Ann 

Fields

Instances
Functor Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

fmap :: (a -> b) -> Ann a -> Ann b #

(<$) :: a -> Ann b -> Ann a #

Foldable Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

fold :: Monoid m => Ann m -> m #

foldMap :: Monoid m => (a -> m) -> Ann a -> m #

foldr :: (a -> b -> b) -> b -> Ann a -> b #

foldr' :: (a -> b -> b) -> b -> Ann a -> b #

foldl :: (b -> a -> b) -> b -> Ann a -> b #

foldl' :: (b -> a -> b) -> b -> Ann a -> b #

foldr1 :: (a -> a -> a) -> Ann a -> a #

foldl1 :: (a -> a -> a) -> Ann a -> a #

toList :: Ann a -> [a] #

null :: Ann a -> Bool #

length :: Ann a -> Int #

elem :: Eq a => a -> Ann a -> Bool #

maximum :: Ord a => Ann a -> a #

minimum :: Ord a => Ann a -> a #

sum :: Num a => Ann a -> a #

product :: Num a => Ann a -> a #

Traversable Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

traverse :: Applicative f => (a -> f b) -> Ann a -> f (Ann b) #

sequenceA :: Applicative f => Ann (f a) -> f (Ann a) #

mapM :: Monad m => (a -> m b) -> Ann a -> m (Ann b) #

sequence :: Monad m => Ann (m a) -> m (Ann a) #

Eq1 Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

liftEq :: (a -> b -> Bool) -> Ann a -> Ann b -> Bool #

Ord1 Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

liftCompare :: (a -> b -> Ordering) -> Ann a -> Ann b -> Ordering #

Show1 Ann Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Ann a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Ann a] -> ShowS #

Eq a => Eq (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

(==) :: Ann a -> Ann a -> Bool #

(/=) :: Ann a -> Ann a -> Bool #

Ord a => Ord (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

compare :: Ann a -> Ann a -> Ordering #

(<) :: Ann a -> Ann a -> Bool #

(<=) :: Ann a -> Ann a -> Bool #

(>) :: Ann a -> Ann a -> Bool #

(>=) :: Ann a -> Ann a -> Bool #

max :: Ann a -> Ann a -> Ann a #

min :: Ann a -> Ann a -> Ann a #

Show a => Show (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

showsPrec :: Int -> Ann a -> ShowS #

show :: Ann a -> String #

showList :: [Ann a] -> ShowS #

Semigroup a => Semigroup (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

(<>) :: Ann a -> Ann a -> Ann a #

sconcat :: NonEmpty (Ann a) -> Ann a #

stimes :: Integral b => b -> Ann a -> Ann a #

Monoid a => Monoid (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Methods

mempty :: Ann a #

mappend :: Ann a -> Ann a -> Ann a #

mconcat :: [Ann a] -> Ann a #

Wrapped (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

Associated Types

type Unwrapped (Ann a) :: Type #

Methods

_Wrapped' :: Iso' (Ann a) (Unwrapped (Ann a)) #

Ann a1 ~ t => Rewrapped (Ann a2) t Source # 
Instance details

Defined in Language.Python.Syntax.Ann

type Unwrapped (Ann a) Source # 
Instance details

Defined in Language.Python.Syntax.Ann

type Unwrapped (Ann a) = a

annot_ :: HasAnn s => Lens' (s a) a Source #

Get an annotation and forget the wrapper

class HasAnn s where Source #

Classy Lens' for things that are annotated

Methods

annot :: Lens' (s a) (Ann a) Source #

Instances
HasAnn Comment Source # 
Instance details

Defined in Language.Python.Syntax.Comment

Methods

annot :: Lens' (Comment a) (Ann a) Source #

HasAnn IntLiteral Source # 
Instance details

Defined in Language.Python.Syntax.Numbers

Methods

annot :: Lens' (IntLiteral a) (Ann a) Source #

HasAnn FloatLiteral Source # 
Instance details

Defined in Language.Python.Syntax.Numbers

Methods

annot :: Lens' (FloatLiteral a) (Ann a) Source #

HasAnn ImagLiteral Source # 
Instance details

Defined in Language.Python.Syntax.Numbers

Methods

annot :: Lens' (ImagLiteral a) (Ann a) Source #

HasAnn Indents Source # 
Instance details

Defined in Language.Python.Syntax.Whitespace

Methods

annot :: Lens' (Indents a) (Ann a) Source #

HasAnn Blank Source # 
Instance details

Defined in Language.Python.Syntax.Whitespace

Methods

annot :: Lens' (Blank a) (Ann a) Source #

HasAnn StringLiteral Source # 
Instance details

Defined in Language.Python.Syntax.Strings

Methods

annot :: Lens' (StringLiteral a) (Ann a) Source #

HasAnn Semicolon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

annot :: Lens' (Semicolon a) (Ann a) Source #

HasAnn UnOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

annot :: Lens' (UnOp a) (Ann a) Source #

HasAnn BinOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Binary

Methods

annot :: Lens' (BinOp a) (Ann a) Source #

HasAnn AugAssign Source # 
Instance details

Defined in Language.Python.Syntax.AugAssign

Methods

annot :: Lens' (AugAssign a) (Ann a) Source #

HasAnn (Ident v) Source # 
Instance details

Defined in Language.Python.Syntax.Ident

Methods

annot :: Lens' (Ident v a) (Ann a) Source #

HasAnn (ModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

annot :: Lens' (ModuleName v a) (Ann a) Source #

HasAnn (RelativeModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

HasAnn (ImportTargets v) Source # 
Instance details

Defined in Language.Python.Syntax.Import

Methods

annot :: Lens' (ImportTargets v a) (Ann a) Source #

HasAnn (Expr v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (Expr v a) (Ann a) Source #

HasAnn (TupleItem v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (TupleItem v a) (Ann a) Source #

HasAnn (SetItem v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (SetItem v a) (Ann a) Source #

HasAnn (ListItem v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (ListItem v a) (Ann a) Source #

HasAnn (DictItem v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (DictItem v a) (Ann a) Source #

HasAnn (CompFor v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (CompFor v a) (Ann a) Source #

HasAnn (CompIf v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (CompIf v a) (Ann a) Source #

HasAnn (Arg v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (Arg v a) (Ann a) Source #

HasAnn (Param v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (Param v a) (Ann a) Source #

HasAnn (CompoundStatement v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (CompoundStatement v a) (Ann a) Source #

HasAnn (Decorator v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (Decorator v a) (Ann a) Source #

HasAnn (WithItem v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (WithItem v a) (Ann a) Source #

HasAnn (Suite v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (Suite v a) (Ann a) Source #

HasAnn (ExceptAs v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (ExceptAs v a) (Ann a) Source #

HasAnn (SimpleStatement v) Source # 
Instance details

Defined in Language.Python.Syntax.Statement

Methods

annot :: Lens' (SimpleStatement v a) (Ann a) Source #

HasAnn (Fundef v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (Fundef v a) (Ann a) Source #

HasAnn (While v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (While v a) (Ann a) Source #

HasAnn (KeywordParam v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (KeywordParam v a) (Ann a) Source #

HasAnn (PositionalParam v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (PositionalParam v a) (Ann a) Source #

HasAnn (StarParam v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (StarParam v a) (Ann a) Source #

HasAnn (UnnamedStarParam v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (UnnamedStarParam v a) (Ann a) Source #

HasAnn (Call v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (Call v a) (Ann a) Source #

HasAnn (If v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (If v a) (Ann a) Source #

HasAnn (For v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (For v a) (Ann a) Source #

HasAnn (TryExcept v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (TryExcept v a) (Ann a) Source #

HasAnn (TryFinally v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (TryFinally v a) (Ann a) Source #

HasAnn (ClassDef v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (ClassDef v a) (Ann a) Source #

HasAnn (With v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (With v a) (Ann a) Source #

HasAnn (Tuple v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (Tuple v a) (Ann a) Source #

HasAnn (List v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (List v a) (Ann a) Source #

HasAnn (ListUnpack v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (ListUnpack v a) (Ann a) Source #

HasAnn (None v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (None v a) (Ann a) Source #

HasAnn (TupleUnpack v) Source # 
Instance details

Defined in Language.Python.Syntax.Types

Methods

annot :: Lens' (TupleUnpack v a) (Ann a) Source #

HasAnn (ImportAs e v) Source # 
Instance details

Defined in Language.Python.Syntax.Import

Methods

annot :: Lens' (ImportAs e v a) (Ann a) Source #

HasAnn (Comprehension e v) Source # 
Instance details

Defined in Language.Python.Syntax.Expr

Methods

annot :: Lens' (Comprehension e v a) (Ann a) Source #