hpython-0.1: Syntax tree and DSL for Python

Copyright(C) CSIRO 2017-2018
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.

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) #

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 #

HasTrailingWhitespace (UnOp a) Source # 
Instance details

Defined in Language.Python.Syntax.Operator.Unary

Methods

trailingWhitespace :: Lens' (UnOp a) [Whitespace] Source #

HasNewlines (UnOp a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

_Newlines :: Traversal' (UnOp a) Newline Source #