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.Internal.Syntax.IR

Description

This module only exists as our current best solution to decoupling parts of the concrete syntax from abstract syntax. You won't need to care about its existence and hopefully it will be deleted soon.

Documentation

class AsIRError s a | s -> a where Source #

Instances
AsIRError (ParseError a) a Source # 
Instance details

Defined in Language.Python.Parse.Error

data IRError a Source #

Constructors

InvalidUnpacking a

Unpacking ( *value ) was used in an invalid position

Instances
Eq a => Eq (IRError a) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: IRError a -> String #

showList :: [IRError a] -> ShowS #

data SmallStatement a Source #

Instances
Functor SmallStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable SmallStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: SmallStatement a -> [a] #

null :: SmallStatement a -> Bool #

length :: SmallStatement a -> Int #

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

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

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

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

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

Traversable SmallStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

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

Defined in Language.Python.Internal.Syntax.IR

data Statement a Source #

Instances
Functor Statement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Statement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Statement a -> [a] #

null :: Statement a -> Bool #

length :: Statement a -> Int #

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

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

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

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

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

Traversable Statement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

data CompoundStatement a Source #

Constructors

Fundef 
If 

Fields

While 

Fields

TryExcept 

Fields

TryFinally 
For 

Fields

ClassDef 
With 

Fields

Instances
Functor CompoundStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Foldable CompoundStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: CompoundStatement a -> [a] #

null :: CompoundStatement a -> Bool #

length :: CompoundStatement a -> Int #

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

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

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

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

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

Traversable CompoundStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

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

Defined in Language.Python.Internal.Syntax.IR

data SimpleStatement a Source #

Instances
Functor SimpleStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable SimpleStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: SimpleStatement a -> [a] #

null :: SimpleStatement a -> Bool #

length :: SimpleStatement a -> Int #

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

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

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

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

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

Traversable SimpleStatement Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

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

Defined in Language.Python.Internal.Syntax.IR

data Param a Source #

Instances
Functor Param Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Param Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Param a -> [a] #

null :: Param a -> Bool #

length :: Param a -> Int #

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

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

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

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

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

Traversable Param Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Param a -> String #

showList :: [Param a] -> ShowS #

data CompIf a Source #

Constructors

CompIf a [Whitespace] (Expr a)

'if' any_spaces expr

Instances
Functor CompIf Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable CompIf Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: CompIf a -> [a] #

null :: CompIf a -> Bool #

length :: CompIf a -> Int #

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

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

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

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

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

Traversable CompIf Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: CompIf a -> String #

showList :: [CompIf a] -> ShowS #

data CompFor a Source #

Instances
Functor CompFor Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable CompFor Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: CompFor a -> [a] #

null :: CompFor a -> Bool #

length :: CompFor a -> Int #

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

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

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

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

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

Traversable CompFor Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: CompFor a -> String #

showList :: [CompFor a] -> ShowS #

data Comprehension e a Source #

Constructors

Comprehension a (e a) (CompFor a) [Either (CompFor a) (CompIf a)]

expr comp_for (comp_for | comp_if)*

Instances
Functor e => Functor (Comprehension e) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

fmap :: (a -> b) -> Comprehension e a -> Comprehension e b #

(<$) :: a -> Comprehension e b -> Comprehension e a #

Foldable e => Foldable (Comprehension e) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

fold :: Monoid m => Comprehension e m -> m #

foldMap :: Monoid m => (a -> m) -> Comprehension e a -> m #

foldr :: (a -> b -> b) -> b -> Comprehension e a -> b #

foldr' :: (a -> b -> b) -> b -> Comprehension e a -> b #

foldl :: (b -> a -> b) -> b -> Comprehension e a -> b #

foldl' :: (b -> a -> b) -> b -> Comprehension e a -> b #

foldr1 :: (a -> a -> a) -> Comprehension e a -> a #

foldl1 :: (a -> a -> a) -> Comprehension e a -> a #

toList :: Comprehension e a -> [a] #

null :: Comprehension e a -> Bool #

length :: Comprehension e a -> Int #

elem :: Eq a => a -> Comprehension e a -> Bool #

maximum :: Ord a => Comprehension e a -> a #

minimum :: Ord a => Comprehension e a -> a #

sum :: Num a => Comprehension e a -> a #

product :: Num a => Comprehension e a -> a #

Traversable e => Traversable (Comprehension e) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

sequenceA :: Applicative f => Comprehension e (f a) -> f (Comprehension e a) #

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

sequence :: Monad m => Comprehension e (m a) -> m (Comprehension e a) #

(Eq a, Eq (e a)) => Eq (Comprehension e a) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

(==) :: Comprehension e a -> Comprehension e a -> Bool #

(/=) :: Comprehension e a -> Comprehension e a -> Bool #

(Show a, Show (e a)) => Show (Comprehension e a) Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

data Subscript a Source #

Constructors

SubscriptExpr (Expr a) 
SubscriptSlice (Maybe (Expr a)) Colon (Maybe (Expr a)) (Maybe (Colon, Maybe (Expr a))) 
Instances
Functor Subscript Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Subscript Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Subscript a -> [a] #

null :: Subscript a -> Bool #

length :: Subscript a -> Int #

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

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

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

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

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

Traversable Subscript Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

data DictItem a Source #

Instances
Functor DictItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable DictItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: DictItem a -> [a] #

null :: DictItem a -> Bool #

length :: DictItem a -> Int #

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

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

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

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

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

Traversable DictItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: DictItem a -> String #

showList :: [DictItem a] -> ShowS #

data Arg a Source #

Instances
Functor Arg Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Arg Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Arg a -> [a] #

null :: Arg a -> Bool #

length :: Arg a -> Int #

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

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

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

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

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

Traversable Arg Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Arg a -> String #

showList :: [Arg a] -> ShowS #

data Expr a Source #

Constructors

StarExpr 
Unit 
Lambda 
Yield 
YieldFrom 
Ternary 
ListComp 
List 
DictComp 
Dict 
SetComp 
Set 
Deref 
Subscript 
Call 
None 
Ellipsis 
BinOp 
UnOp 
Parens 
Ident 

Fields

Int 
Float 
Imag 
Bool 
String 
Tuple 
Not 
Generator 
Await 
Instances
Functor Expr Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Expr Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Expr a -> [a] #

null :: Expr a -> Bool #

length :: Expr a -> Int #

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

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

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

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

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

Traversable Expr Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Expr a -> String #

showList :: [Expr a] -> ShowS #

data Suite a Source #

Instances
Functor Suite Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Suite Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Suite a -> [a] #

null :: Suite a -> Bool #

length :: Suite a -> Int #

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

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

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

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

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

Traversable Suite Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Suite a -> String #

showList :: [Suite a] -> ShowS #

data Block a Source #

Constructors

Block 
Instances
Functor Block Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Block Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Block a -> [a] #

null :: Block a -> Bool #

length :: Block a -> Int #

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

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

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

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

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

Traversable Block Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Block a -> String #

showList :: [Block a] -> ShowS #

data WithItem a Source #

Constructors

WithItem 
Instances
Functor WithItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable WithItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: WithItem a -> [a] #

null :: WithItem a -> Bool #

length :: WithItem a -> Int #

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

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

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

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

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

Traversable WithItem Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: WithItem a -> String #

showList :: [WithItem a] -> ShowS #

data Decorator a Source #

Instances
Functor Decorator Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Decorator Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Decorator a -> [a] #

null :: Decorator a -> Bool #

length :: Decorator a -> Int #

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

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

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

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

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

Traversable Decorator Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

data ExceptAs a Source #

Constructors

ExceptAs 
Instances
Functor ExceptAs Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable ExceptAs Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: ExceptAs a -> [a] #

null :: ExceptAs a -> Bool #

length :: ExceptAs a -> Int #

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

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

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

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

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

Traversable ExceptAs Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: ExceptAs a -> String #

showList :: [ExceptAs a] -> ShowS #

data Module a Source #

Instances
Functor Module Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

Foldable Module Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

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

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

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

toList :: Module a -> [a] #

null :: Module a -> Bool #

length :: Module a -> Int #

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

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

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

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

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

Traversable Module Source # 
Instance details

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

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

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

Defined in Language.Python.Internal.Syntax.IR

Methods

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

show :: Module a -> String #

showList :: [Module a] -> ShowS #

fromIR_arg :: AsIRError e a => Arg a -> Validation (NonEmpty e) (Arg '[] a) Source #

fromIR_comprehension :: AsIRError e a => (ex a -> Validation (NonEmpty e) (ex' '[] a)) -> Comprehension ex a -> Validation (NonEmpty e) (Comprehension ex' '[] a) Source #