hpython-0.1: Python language tools

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

Language.Python.Syntax.Punctuation

Description

These types are used throughout the syntax tree to help preserve formatting.

Synopsis

Documentation

data Dot Source #

A period character, possibly followed by some whitespace.

Constructors

MkDot [Whitespace] 
Instances
Eq Dot Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

(==) :: Dot -> Dot -> Bool #

(/=) :: Dot -> Dot -> Bool #

Show Dot Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

showsPrec :: Int -> Dot -> ShowS #

show :: Dot -> String #

showList :: [Dot] -> ShowS #

HasTrailingWhitespace Dot Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines Dot Source # 
Instance details

Defined in Language.Python.Optics.Newlines

newtype Comma Source #

The venerable comma separator

Constructors

MkComma [Whitespace] 

data Semicolon a Source #

Constructors

MkSemicolon a [Whitespace] 
Instances
Functor Semicolon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

Foldable Semicolon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

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

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

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

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

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

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

toList :: Semicolon a -> [a] #

null :: Semicolon a -> Bool #

length :: Semicolon a -> Int #

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

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

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

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

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

Traversable Semicolon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

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

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

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

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

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

Defined in Language.Python.Syntax.Punctuation

HasTrailingWhitespace (Semicolon a) Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines (Semicolon a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

newtype At Source #

Constructors

MkAt [Whitespace] 
Instances
Eq At Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

(==) :: At -> At -> Bool #

(/=) :: At -> At -> Bool #

Show At Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

showsPrec :: Int -> At -> ShowS #

show :: At -> String #

showList :: [At] -> ShowS #

HasTrailingWhitespace At Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines At Source # 
Instance details

Defined in Language.Python.Optics.Newlines