pire-0.2.5

Copyright(c) Andreas Reuleaux 2015 - 2018
LicenseBSD2
MaintainerAndreas Reuleaux <rx@a-rx.info>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

TT

Description

Pire's token trees (syntax representation, faithful to the original program code),

Documentation

data TT t a Source #

Constructors

Id a 
Bnd t (TT t a) 
Token t 
Ws t 
Binder t 
NatLit t 
Invisible t 
None 
Located Delta (TT t a) 
Node [TT t a] 
Pair (TT t a) (TT t a) 
Triple (TT t a) (TT t a) (TT t a) 
Abstract1 t (Scope () (TT t) a) 
Abstract [t] (Scope Int (TT t) a) 
Abstract1_ (Scope () (TT t) a) 
Abstract_ (Scope Int (TT t) a) 
Instances
Bitraversable TT Source # 
Instance details

Defined in TT

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> TT a b -> f (TT c d) #

Bifoldable TT Source # 
Instance details

Defined in TT

Methods

bifold :: Monoid m => TT m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> TT a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> TT a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> TT a b -> c #

Bifunctor TT Source # 
Instance details

Defined in TT

Methods

bimap :: (a -> b) -> (c -> d) -> TT a c -> TT b d #

first :: (a -> b) -> TT a c -> TT b c #

second :: (b -> c) -> TT a b -> TT a c #

Monad (TT a) Source # 
Instance details

Defined in TT

Methods

(>>=) :: TT a a0 -> (a0 -> TT a b) -> TT a b #

(>>) :: TT a a0 -> TT a b -> TT a b #

return :: a0 -> TT a a0 #

fail :: String -> TT a a0 #

Functor (TT t) Source # 
Instance details

Defined in TT

Methods

fmap :: (a -> b) -> TT t a -> TT t b #

(<$) :: a -> TT t b -> TT t a #

Applicative (TT t) Source # 
Instance details

Defined in TT

Methods

pure :: a -> TT t a #

(<*>) :: TT t (a -> b) -> TT t a -> TT t b #

liftA2 :: (a -> b -> c) -> TT t a -> TT t b -> TT t c #

(*>) :: TT t a -> TT t b -> TT t b #

(<*) :: TT t a -> TT t b -> TT t a #

Foldable (TT t) Source # 
Instance details

Defined in TT

Methods

fold :: Monoid m => TT t m -> m #

foldMap :: Monoid m => (a -> m) -> TT t a -> m #

foldr :: (a -> b -> b) -> b -> TT t a -> b #

foldr' :: (a -> b -> b) -> b -> TT t a -> b #

foldl :: (b -> a -> b) -> b -> TT t a -> b #

foldl' :: (b -> a -> b) -> b -> TT t a -> b #

foldr1 :: (a -> a -> a) -> TT t a -> a #

foldl1 :: (a -> a -> a) -> TT t a -> a #

toList :: TT t a -> [a] #

null :: TT t a -> Bool #

length :: TT t a -> Int #

elem :: Eq a => a -> TT t a -> Bool #

maximum :: Ord a => TT t a -> a #

minimum :: Ord a => TT t a -> a #

sum :: Num a => TT t a -> a #

product :: Num a => TT t a -> a #

Traversable (TT t) Source # 
Instance details

Defined in TT

Methods

traverse :: Applicative f => (a -> f b) -> TT t a -> f (TT t b) #

sequenceA :: Applicative f => TT t (f a) -> f (TT t a) #

mapM :: Monad m => (a -> m b) -> TT t a -> m (TT t b) #

sequence :: Monad m => TT t (m a) -> m (TT t a) #

Eq t => Eq1 (TT t) Source # 
Instance details

Defined in TT

Methods

liftEq :: (a -> b -> Bool) -> TT t a -> TT t b -> Bool #

Ord t => Ord1 (TT t) Source # 
Instance details

Defined in TT

Methods

liftCompare :: (a -> b -> Ordering) -> TT t a -> TT t b -> Ordering #

Show t => Show1 (TT t) Source # 
Instance details

Defined in TT

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> TT t a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [TT t a] -> ShowS #

(Eq t, Eq a) => Eq (TT t a) Source # 
Instance details

Defined in TT

Methods

(==) :: TT t a -> TT t a -> Bool #

(/=) :: TT t a -> TT t a -> Bool #

(Data t, Data a) => Data (TT t a) Source # 
Instance details

Defined in TT

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TT t a -> c (TT t a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TT t a) #

toConstr :: TT t a -> Constr #

dataTypeOf :: TT t a -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (TT t a)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (TT t a)) #

gmapT :: (forall b. Data b => b -> b) -> TT t a -> TT t a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TT t a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TT t a -> r #

gmapQ :: (forall d. Data d => d -> u) -> TT t a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TT t a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TT t a -> m (TT t a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TT t a -> m (TT t a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TT t a -> m (TT t a) #

(Ord t, Ord a) => Ord (TT t a) Source # 
Instance details

Defined in TT

Methods

compare :: TT t a -> TT t a -> Ordering #

(<) :: TT t a -> TT t a -> Bool #

(<=) :: TT t a -> TT t a -> Bool #

(>) :: TT t a -> TT t a -> Bool #

(>=) :: TT t a -> TT t a -> Bool #

max :: TT t a -> TT t a -> TT t a #

min :: TT t a -> TT t a -> TT t a #

(Show t, Show a) => Show (TT t a) Source # 
Instance details

Defined in TT

Methods

showsPrec :: Int -> TT t a -> ShowS #

show :: TT t a -> String #

showList :: [TT t a] -> ShowS #

Semigroup (TT t a) Source # 
Instance details

Defined in TT

Methods

(<>) :: TT t a -> TT t a -> TT t a #

sconcat :: NonEmpty (TT t a) -> TT t a #

stimes :: Integral b => b -> TT t a -> TT t a #

Monoid (TT t a) Source # 
Instance details

Defined in TT

Methods

mempty :: TT t a #

mappend :: TT t a -> TT t a -> TT t a #

mconcat :: [TT t a] -> TT t a #

Pretty (TT String String) # 
Instance details

Defined in PrettyTT

Methods

pretty :: TT String String -> Doc ann #

prettyList :: [TT String String] -> Doc ann #

Pretty (TT Text Text) # 
Instance details

Defined in PrettyTT

Methods

pretty :: TT Text Text -> Doc ann #

prettyList :: [TT Text Text] -> Doc ann #

PrettyAnn (TT String String) Source # 
Instance details

Defined in PrettyTT

PrettyAnn (TT Text Text) Source # 
Instance details

Defined in PrettyTT

NoPos (Module t a, TT t a) Source # 
Instance details

Defined in NoPos

Methods

nopos :: (Module t a, TT t a) -> (Module t a, TT t a) Source #

NoPos (ConstructorDef t a, TT t a) Source # 
Instance details

Defined in NoPos

Methods

nopos :: (ConstructorDef t a, TT t a) -> (ConstructorDef t a, TT t a) Source #

NoPos (Decl t a, TT t a) Source # 
Instance details

Defined in NoPos

Methods

nopos :: (Decl t a, TT t a) -> (Decl t a, TT t a) Source #

NoPos (Arg t a, TT t a) Source # 
Instance details

Defined in NoPos

Methods

nopos :: (Arg t a, TT t a) -> (Arg t a, TT t a) Source #

NoPos (Expr t a, TT t a) Source # 
Instance details

Defined in NoPos

Methods

nopos :: (Expr t a, TT t a) -> (Expr t a, TT t a) Source #

Eq a => Wrap (TT a a) Source # 
Instance details

Defined in Wrap

Methods

wrap :: TT a a -> TT a a Source #

T2S (Module Text Text, TT Text Text) (Module String String, TT String String) Source # 
Instance details

Defined in Text2String

T2S (TT Text Text) (TT String String) Source # 
Instance details

Defined in Text2String

unpair :: TT t a -> [TT t a] Source #

_Id :: forall t a. Prism' (TT t a) a Source #

_Bnd :: forall t a. Prism' (TT t a) (t, TT t a) Source #

_Token :: forall t a. Prism' (TT t a) t Source #

_Ws :: forall t a. Prism' (TT t a) t Source #

_Binder :: forall t a. Prism' (TT t a) t Source #

_NatLit :: forall t a. Prism' (TT t a) t Source #

_Invisible :: forall t a. Prism' (TT t a) t Source #

_None :: forall t a. Prism' (TT t a) () Source #

_Located :: forall t a. Prism' (TT t a) (Delta, TT t a) Source #

_Node :: forall t a. Prism' (TT t a) [TT t a] Source #

_Pair :: forall t a. Prism' (TT t a) (TT t a, TT t a) Source #

_Triple :: forall t a. Prism' (TT t a) (TT t a, TT t a, TT t a) Source #

_Abstract1 :: forall t a. Prism' (TT t a) (t, Scope () (TT t) a) Source #

_Abstract :: forall t a. Prism' (TT t a) ([t], Scope Int (TT t) a) Source #

_Abstract1_ :: forall t a. Prism' (TT t a) (Scope () (TT t) a) Source #

_Abstract_ :: forall t a. Prism' (TT t a) (Scope Int (TT t) a) Source #

(<:>) :: TT t a -> TT t a -> TT t a Source #

otherbt :: Applicative f => (k -> f t) -> (a1 -> f a2) -> TT k a1 -> f (TT t a2) Source #

_flatten :: Lens' (TT t a) [TT t a] Source #

flatten :: TT t t -> [t] Source #