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.Operator.Unary

Description

Unary operators

Synopsis

Documentation

data UnOp a Source #

An UnOp is a unary operator in Python, such as - for negation. An operator is stored with an annotation and its trailing whitespace.

Constructors

Negate (Ann a) [Whitespace]
-a
Positive (Ann a) [Whitespace]
+a
Complement (Ann a) [Whitespace]
~a
Instances
Functor UnOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

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

Foldable UnOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

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

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

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

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

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

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

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

toList :: UnOp a -> [a] #

null :: UnOp a -> Bool #

length :: UnOp a -> Int #

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

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

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

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

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

Traversable UnOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

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

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

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

HasAnn UnOp Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

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

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

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

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

Defined in Language.Python.Syntax.Operator.Unary

Methods

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

show :: UnOp a -> String #

showList :: [UnOp a] -> ShowS #

Generic (UnOp a) Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Associated Types

type Rep (UnOp a) :: Type -> Type #

Methods

from :: UnOp a -> Rep (UnOp a) x #

to :: Rep (UnOp a) x -> UnOp a #

HasTrailingWhitespace (UnOp a) Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

HasNewlines (UnOp a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

type Rep (UnOp a) Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary