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

Description

Module names, including those qualified by packages.

See https://docs.python.org/3.5/tutorial/modules.html#packages

Synopsis

Documentation

data ModuleName v a Source #

A module name. It can be a single segment, or a sequence of them which are implicitly separated by period character.

a
a.b

Constructors

ModuleNameOne a (Ident v a) 
ModuleNameMany a (Ident v a) Dot (ModuleName v a) 
Instances
Functor (ModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

Foldable (ModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

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

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

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

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

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

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

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

null :: ModuleName v a -> Bool #

length :: ModuleName v a -> Int #

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

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

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

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

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

Traversable (ModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

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

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

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

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

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

Defined in Language.Python.Syntax.ModuleNames

Methods

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

show :: ModuleName v a -> String #

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

HasTrailingWhitespace (ModuleName v a) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

HasNewlines (ModuleName v a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

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

data RelativeModuleName v a Source #

Instances
Functor (RelativeModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

Foldable (RelativeModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

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

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

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

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

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

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

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

null :: RelativeModuleName v a -> Bool #

length :: RelativeModuleName v a -> Int #

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

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

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

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

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

Traversable (RelativeModuleName v) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

Methods

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

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

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

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

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

Defined in Language.Python.Syntax.ModuleNames

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

Defined in Language.Python.Syntax.ModuleNames

HasTrailingWhitespace (RelativeModuleName v a) Source # 
Instance details

Defined in Language.Python.Syntax.ModuleNames

HasNewlines (RelativeModuleName v a) Source # 
Instance details

Defined in Language.Python.Optics.Newlines

Methods

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

makeModuleName :: Ident v a -> [([Whitespace], Ident v a)] -> ModuleName v a Source #

Convenience constructor for ModuleName

_moduleNameAnn :: ModuleName v a -> a Source #

Get the annotation from a ModuleName