hpython-0.2: Python language tools

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

Language.Python.Internal.Token

Description

 
Synopsis

Documentation

data PyToken a Source #

A PyToken is a single lexical token of Python source. A PyToken has an optional annotation, which can be '()' when no annotation is desired.

Instances
Functor PyToken Source # 
Instance details

Defined in Language.Python.Internal.Token

Methods

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

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

Eq1 PyToken Source # 
Instance details

Defined in Language.Python.Internal.Token

Methods

liftEq :: (a -> b -> Bool) -> PyToken a -> PyToken b -> Bool #

Ord1 PyToken Source # 
Instance details

Defined in Language.Python.Internal.Token

Methods

liftCompare :: (a -> b -> Ordering) -> PyToken a -> PyToken b -> Ordering #

Eq (PyToken a) Source # 
Instance details

Defined in Language.Python.Internal.Token

Methods

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

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

Ord (PyToken a) Source # 
Instance details

Defined in Language.Python.Internal.Token

Methods

compare :: PyToken a -> PyToken a -> Ordering #

(<) :: PyToken a -> PyToken a -> Bool #

(<=) :: PyToken a -> PyToken a -> Bool #

(>) :: PyToken a -> PyToken a -> Bool #

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

max :: PyToken a -> PyToken a -> PyToken a #

min :: PyToken a -> PyToken a -> PyToken a #

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

Defined in Language.Python.Internal.Token

Methods

showsPrec :: Int -> PyToken a -> ShowS #

show :: PyToken a -> String #

showList :: [PyToken a] -> ShowS #

HasIndents (PyToken a) a Source # 
Instance details

Defined in Language.Python.Optics.Indents

AsParseError (ParseError a) (PyToken a) Source # 
Instance details

Defined in Language.Python.Parse.Error

pyTokenAnn :: PyToken a -> a Source #

Get the annotation from a PyToken.