apiary-0.6.0.1: Simple web framework inspired by scotty.

Safe HaskellNone

Control.Monad.Apiary.Filter.Internal.Capture

Synopsis

Documentation

data Equal Source

Constructors

Equal Text 

Instances

class CaptureElem a whereSource

Associated Types

type Next a xs :: [*]Source

Methods

captureElem :: a -> Text -> SList xs -> Maybe (SList (Next a xs))Source

Instances

type family CaptureResult bf as :: [*]Source

capture' :: Capture as => SList as -> [Text] -> SList xs -> Maybe (SList (CaptureResult xs as))Source

capture :: (Capture as, Monad m) => SList as -> ApiaryT (CaptureResult xs as) m b -> ApiaryT xs m bSource

low level (without Template Haskell) capture. since 0.4.2.0

 myCapture :: SList '[Equal, Fetch Int, Fetch String]
 myCapture = Equal "path" ::: pInt ::: pString ::: SNil

capture myCapture . stdMethod GET . action $ age name -> do
     yourAction