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

Description

 
Synopsis

Documentation

data Module v a Source #

A Python Module, which is stored as a sequence of statements. A module corresponds to one source file of Python code.

Instances
HasStatements Module Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

_Statements :: Traversal (Module v a) (Module [] a) (Statement v a) (Statement [] a) Source #

Functor (Module v) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

fmap :: (a -> b) -> Module v a -> Module v b #

(<$) :: a -> Module v b -> Module v a #

Foldable (Module v) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

fold :: Monoid m => Module v m -> m #

foldMap :: Monoid m => (a -> m) -> Module v a -> m #

foldr :: (a -> b -> b) -> b -> Module v a -> b #

foldr' :: (a -> b -> b) -> b -> Module v a -> b #

foldl :: (b -> a -> b) -> b -> Module v a -> b #

foldl' :: (b -> a -> b) -> b -> Module v a -> b #

foldr1 :: (a -> a -> a) -> Module v a -> a #

foldl1 :: (a -> a -> a) -> Module v a -> a #

toList :: Module v a -> [a] #

null :: Module v a -> Bool #

length :: Module v a -> Int #

elem :: Eq a => a -> Module v a -> Bool #

maximum :: Ord a => Module v a -> a #

minimum :: Ord a => Module v a -> a #

sum :: Num a => Module v a -> a #

product :: Num a => Module v a -> a #

Traversable (Module v) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

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

sequenceA :: Applicative f => Module v (f a) -> f (Module v a) #

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

sequence :: Monad m => Module v (m a) -> m (Module v a) #

Eq a => Eq (Module v a) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

(==) :: Module v a -> Module v a -> Bool #

(/=) :: Module v a -> Module v a -> Bool #

Show a => Show (Module v a) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

showsPrec :: Int -> Module v a -> ShowS #

show :: Module v a -> String #

showList :: [Module v a] -> ShowS #

HasNewlines (Module v a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

_Newlines :: Traversal' (Module v a) Newline Source #