rere-0.1: Regular-expressions extended with fixpoints for context-free powers

Safe HaskellSafe
LanguageHaskell2010

RERE.Var

Description

Variables, de Bruijn indices and names.

Synopsis

Documentation

data Var a Source #

Var is essentially Maybe.

Constructors

B

bound

F a

free variable.

Instances
Functor Var Source # 
Instance details

Defined in RERE.Var

Methods

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

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

Foldable Var Source # 
Instance details

Defined in RERE.Var

Methods

fold :: Monoid m => Var m -> m #

foldMap :: Monoid m => (a -> m) -> Var a -> m #

foldr :: (a -> b -> b) -> b -> Var a -> b #

foldr' :: (a -> b -> b) -> b -> Var a -> b #

foldl :: (b -> a -> b) -> b -> Var a -> b #

foldl' :: (b -> a -> b) -> b -> Var a -> b #

foldr1 :: (a -> a -> a) -> Var a -> a #

foldl1 :: (a -> a -> a) -> Var a -> a #

toList :: Var a -> [a] #

null :: Var a -> Bool #

length :: Var a -> Int #

elem :: Eq a => a -> Var a -> Bool #

maximum :: Ord a => Var a -> a #

minimum :: Ord a => Var a -> a #

sum :: Num a => Var a -> a #

product :: Num a => Var a -> a #

Traversable Var Source # 
Instance details

Defined in RERE.Var

Methods

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

sequenceA :: Applicative f => Var (f a) -> f (Var a) #

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

sequence :: Monad m => Var (m a) -> m (Var a) #

Eq a => Eq (Var a) Source # 
Instance details

Defined in RERE.Var

Methods

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

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

Ord a => Ord (Var a) Source # 
Instance details

Defined in RERE.Var

Methods

compare :: Var a -> Var a -> Ordering #

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

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

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

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

max :: Var a -> Var a -> Var a #

min :: Var a -> Var a -> Var a #

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

Defined in RERE.Var

Methods

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

show :: Var a -> String #

showList :: [Var a] -> ShowS #

IsString a => IsString (Var a) Source # 
Instance details

Defined in RERE.Var

Methods

fromString :: String -> Var a #

unvar :: r -> (a -> r) -> Var a -> r Source #

Analogue of maybe for Var.

swapVar :: Var (Var a) -> Var (Var a) Source #

Swap variables.

data Name Source #

Names carry information used in pretty-printing, but otherwise they all compare EQual.

Constructors

N String [Char] 
Instances
Eq Name Source # 
Instance details

Defined in RERE.Var

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name Source # 
Instance details

Defined in RERE.Var

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name Source # 
Instance details

Defined in RERE.Var

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

IsString Name Source # 
Instance details

Defined in RERE.Var

Methods

fromString :: String -> Name #

derivativeName :: Char -> Name -> Name Source #

Make a name for derivative binding (adds subindex).