hpython-0.3: Python language tools

Copyright(C) CSIRO 2017-2019
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
HasExprs Module Source # 
Instance details

Defined in Language.Python.Syntax.Module

Methods

_Exprs :: Traversal (Module v a) (Module [] a) (Expr v a) (Expr [] a) Source #

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 #

HasIdents Module Source # 
Instance details

Defined in Language.Python.Optics.Idents

Methods

_Idents :: Traversal (Module v a) (Module [] a) (Ident v a) (Ident [] 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 #

Generic (Module v a) Source # 
Instance details

Defined in Language.Python.Syntax.Module

Associated Types

type Rep (Module v a) :: Type -> Type #

Methods

from :: Module v a -> Rep (Module v a) x #

to :: Rep (Module v a) x -> Module v a #

HasNewlines (Module v a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

type Rep (Module v a) Source # 
Instance details

Defined in Language.Python.Syntax.Module