apiary-0.4.3.2: Simple web framework inspired by scotty.

Safe HaskellNone

Control.Monad.Apiary.Filter.Capture

Synopsis

Documentation

data Equal Source

Constructors

Equal Text 

Instances

data Fetch a Source

Constructors

Fetch 

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 ::: (Fetch :: Fetch Int) ::: (Fetch :: Fetch String) ::: SNil

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