Copyright | (C) CSIRO 2017-2018 |
---|---|
License | BSD3 |
Maintainer | Isaac Elliott <isaace71295@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Unary operators
Synopsis
- data UnOp a
- = Negate a [Whitespace]
- | Positive a [Whitespace]
- | Complement a [Whitespace]
Documentation
An UnOp
is a unary operator in Python, such as -
for negation.
An operator is stored with an annotation and its trailing whitespace.
Negate a [Whitespace] | -a |
Positive a [Whitespace] | +a |
Complement a [Whitespace] | ~a |
Instances
Functor UnOp Source # | |
Foldable UnOp Source # | |
Defined in Language.Python.Syntax.Operator.Unary 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 # elem :: Eq a => a -> UnOp a -> Bool # maximum :: Ord a => UnOp a -> a # | |
Traversable UnOp Source # | |
Eq a => Eq (UnOp a) Source # | |
Show a => Show (UnOp a) Source # | |
HasTrailingWhitespace (UnOp a) Source # | |
Defined in Language.Python.Syntax.Operator.Unary trailingWhitespace :: Lens' (UnOp a) [Whitespace] Source # | |
HasNewlines (UnOp a) Source # | |