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

Methods

_Newlines :: Traversal' Dot Newline Source #

newtype Comma Source #

The venerable comma separator

Constructors

MkComma [Whitespace] 
Instances
Eq Comma Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

Show Comma Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

showsPrec :: Int -> Comma -> ShowS #

show :: Comma -> String #

showList :: [Comma] -> ShowS #

HasTrailingWhitespace Comma Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines Comma Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

_Newlines :: Traversal' Comma Newline Source #

newtype Colon Source #

Constructors

MkColon [Whitespace] 
Instances
Eq Colon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

Show Colon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

showsPrec :: Int -> Colon -> ShowS #

show :: Colon -> String #

showList :: [Colon] -> ShowS #

HasTrailingWhitespace Colon Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines Colon Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

_Newlines :: Traversal' Colon Newline Source #

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

Methods

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

newtype Equals Source #

Constructors

MkEquals [Whitespace] 
Instances
Eq Equals Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

Methods

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

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

Show Equals Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasTrailingWhitespace Equals Source # 
Instance details

Defined in Language.Python.Syntax.Punctuation

HasNewlines Equals Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

_Newlines :: Traversal' Equals Newline Source #

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

Methods

_Newlines :: Traversal' At Newline Source #