Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
Represents a URI template.
Instances
Eq Template Source # | |
Data Template Source # | |
Defined in Burrito.Internal.Type.Template gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Template -> c Template # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Template # toConstr :: Template -> Constr # dataTypeOf :: Template -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Template) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Template) # gmapT :: (forall b. Data b => b -> b) -> Template -> Template # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Template -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Template -> r # gmapQ :: (forall d. Data d => d -> u) -> Template -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Template -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Template -> m Template # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Template -> m Template # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Template -> m Template # | |
Ord Template Source # | |
Defined in Burrito.Internal.Type.Template | |
Show Template Source # | |
render :: Template -> String Source #
Renders a template back into a string. This is essentially the opposite of
parse
. Usually you'll want to use expand
to actually substitute
variables in the template, but this can be useful for printing out the
template itself
>>>
render <$> parse "valid-template"
Just "valid-template">>>
render <$> parse "{var}"
Just "{var}"