trasa-th-0.4: Template Haskell to generate trasa routes

Safe HaskellNone
LanguageHaskell2010

Trasa.TH

Synopsis

Documentation

data Name #

An abstract type representing names in the syntax tree.

Names can be constructed in several ways, which come with different name-capture guarantees (see Language.Haskell.TH.Syntax for an explanation of name capture):

  • the built-in syntax 'f and ''T can be used to construct names, The expression 'f gives a Name which refers to the value f currently in scope, and ''T gives a Name which refers to the type T currently in scope. These names can never be captured.
  • lookupValueName and lookupTypeName are similar to 'f and ''T respectively, but the Names are looked up at the point where the current splice is being run. These names can never be captured.
  • newName monadically generates a new name, which can never be captured.
  • mkName generates a capturable name.

Names constructed using newName and mkName may be used in bindings (such as let x = ... or x -> ...), but names constructed using lookupValueName, lookupTypeName, 'f, ''T may not.

Instances
Eq Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Data Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name #

toConstr :: Name -> Constr #

dataTypeOf :: Name -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Name -> Name #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

Ord Name 
Instance details

Defined in Language.Haskell.TH.Syntax

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 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Ppr Name 
Instance details

Defined in Language.Haskell.TH.Ppr

Methods

ppr :: Name -> Doc #

ppr_list :: [Name] -> Doc #

type Rep Name 
Instance details

Defined in Language.Haskell.TH.Syntax

data CaptureRep codecRep Source #

Constructors

MatchRep String 
CaptureRep codecRep 
Instances
Functor CaptureRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

Foldable CaptureRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

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

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

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

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

toList :: CaptureRep a -> [a] #

null :: CaptureRep a -> Bool #

length :: CaptureRep a -> Int #

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

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

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

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

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

Traversable CaptureRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

Show codecRep => Show (CaptureRep codecRep) Source # 
Instance details

Defined in Trasa.TH.Types

Methods

showsPrec :: Int -> CaptureRep codecRep -> ShowS #

show :: CaptureRep codecRep -> String #

showList :: [CaptureRep codecRep] -> ShowS #

data ParamRep codecRep Source #

Constructors

FlagRep 
OptionalRep codecRep 
ListRep codecRep 
Instances
Functor ParamRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

Foldable ParamRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

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

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

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

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

toList :: ParamRep a -> [a] #

null :: ParamRep a -> Bool #

length :: ParamRep a -> Int #

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

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

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

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

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

Traversable ParamRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

Show codecRep => Show (ParamRep codecRep) Source # 
Instance details

Defined in Trasa.TH.Types

Methods

showsPrec :: Int -> ParamRep codecRep -> ShowS #

show :: ParamRep codecRep -> String #

showList :: [ParamRep codecRep] -> ShowS #

data QueryRep codecRep Source #

Constructors

QueryRep 

Fields

Instances
Functor QueryRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

Foldable QueryRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

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

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

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

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

toList :: QueryRep a -> [a] #

null :: QueryRep a -> Bool #

length :: QueryRep a -> Int #

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

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

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

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

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

Traversable QueryRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

Show codecRep => Show (QueryRep codecRep) Source # 
Instance details

Defined in Trasa.TH.Types

Methods

showsPrec :: Int -> QueryRep codecRep -> ShowS #

show :: QueryRep codecRep -> String #

showList :: [QueryRep codecRep] -> ShowS #

data RouteRep codecRep Source #

Constructors

RouteRep 
Instances
Functor RouteRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

Foldable RouteRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

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

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

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

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

toList :: RouteRep a -> [a] #

null :: RouteRep a -> Bool #

length :: RouteRep a -> Int #

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

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

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

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

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

Traversable RouteRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

Show codecRep => Show (RouteRep codecRep) Source # 
Instance details

Defined in Trasa.TH.Types

Methods

showsPrec :: Int -> RouteRep codecRep -> ShowS #

show :: RouteRep codecRep -> String #

showList :: [RouteRep codecRep] -> ShowS #

data RoutesRep codecRep Source #

Constructors

RoutesRep 

Fields

Instances
Functor RoutesRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

Foldable RoutesRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

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

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

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

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

toList :: RoutesRep a -> [a] #

null :: RoutesRep a -> Bool #

length :: RoutesRep a -> Int #

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

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

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

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

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

Traversable RoutesRep Source # 
Instance details

Defined in Trasa.TH.Types

Methods

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

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

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

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

Show codecRep => Show (RoutesRep codecRep) Source # 
Instance details

Defined in Trasa.TH.Types

Methods

showsPrec :: Int -> RoutesRep codecRep -> ShowS #

show :: RoutesRep codecRep -> String #

showList :: [RoutesRep codecRep] -> ShowS #