Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- capture :: forall b m i ts. (FromHttpApiData b, Introspection i Capture b, MonadThrow m) => Text -> ValueCombinator i (WithPiece b) ts m
- captures :: forall b m i ts. (FromHttpApiData b, Introspection i Captures b, MonadThrow m) => Text -> ValueCombinator i (WithPieces b) ts m
- piece :: String -> Combinator i ts m
Documentation
capture :: forall b m i ts. (FromHttpApiData b, Introspection i Capture b, MonadThrow m) => Text -> ValueCombinator i (WithPiece b) ts m Source #
Captures one piece of path
capture
@Text.>
...
:: forall b m i ts. (FromHttpApiData b, Introspection i Captures b, MonadThrow m) | |
=> Text | . |
-> ValueCombinator i (WithPieces b) ts m |
Captures the rest of path
captures
@Text.>
...
piece :: String -> Combinator i ts m Source #
Could be omitted with OverloadedStrings
{-# LANGUAGE OverloadedStrings #-}
"bar" />
...
{-# LANGUAGE NoOverloadedStrings #-}piece
"bar"/>
...
Also splits piece with /, so
piece "foo/bar/bar" == piece "foo"/>
piece "bar"/>
piece "baz" "foo/bar/baz" == "foo"/>
"bar"/>
"baz"