-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple and type safe web framework that can be automatically generate API documentation. -- @package apiary @version 0.17.0 module Data.Apiary.Proxy module Data.Apiary.SList data SList (as :: [*]) SNil :: SList [] (:::) :: a -> SList xs -> SList (a : xs) type Fn c a = Apply (Reverse c) a apply :: Fn c r -> SList c -> r apply' :: Apply xs r -> SList xs -> r type Reverse (a :: [*]) = Rev a [] sReverse :: SList as -> SList (Reverse as) instance [overlap ok] (All Show as) => Show (SList as) -- | reexporting Network.Wai to reduce dependencies from apiary-* packages. module Web.Apiary.Wai module Data.Apiary.Extension.Internal data Extensions (es :: [*]) NoExtension :: Extensions [] AddExtension :: (e :: *) -> Extensions es -> Extensions (e : es) class Has a (as :: [*]) getExtension :: Has a as => proxy a -> Extensions as -> a newtype Initializer m i o Initializer :: (forall a. Extensions i -> (Extensions o -> m a) -> m a) -> Initializer m i o unInitializer :: Initializer m i o -> forall a. Extensions i -> (Extensions o -> m a) -> m a instance [overlap ok] Monad m => Category (Initializer m) instance [overlap ok] Has a as => Has a (a' : as) instance [overlap ok] Has a (a : as) module Data.Apiary.Extension class Has a (as :: [*]) getExtension :: Has a as => proxy a -> Extensions as -> a data Extensions (es :: [*]) addExtension :: e -> Extensions es -> Extensions (e : es) noExtension :: Monad m => Initializer m i i data Initializer m i o initializer :: Monad m => (Extensions es -> m e) -> Initializer m es (e : es) type Initializer' m a = forall i. Initializer m i (a : i) initializer' :: Monad m => m e -> Initializer' m e initializerBracket :: (forall a. Extensions es -> (e -> m a) -> m a) -> Initializer m es (e : es) initializerBracket' :: (forall a. (e -> m a) -> m a) -> Initializer m es (e : es) -- | combine two Initializer. since 0.16.0. (+>) :: Monad m => Initializer m i x -> Initializer m x o -> Initializer m i o -- | Deprecated: DEPRECATED preAction :: Monad m => m a -> Initializer m i i module Data.Apiary.Method data Method GET :: Method POST :: Method HEAD :: Method PUT :: Method DELETE :: Method TRACE :: Method CONNECT :: Method OPTIONS :: Method PATCH :: Method NonStandard :: ByteString -> Method renderMethod :: Method -> ByteString dispatchMethod :: a -> a -> a -> a -> a -> a -> a -> a -> a -> (ByteString -> a) -> ByteString -> a parseMethod :: ByteString -> Method instance Eq Method instance Ord Method instance Read Method instance Show Method instance IsString Method instance Hashable Method module Data.Apiary.Param jsToBool :: (IsString a, Eq a) => a -> Bool readPathAs :: Path a => proxy a -> Text -> Maybe a data Text type Param = (ByteString, ByteString) data File File :: ByteString -> ByteString -> ByteString -> ByteString -> File fileParameter :: File -> ByteString fileName :: File -> ByteString fileContentType :: File -> ByteString fileContent :: File -> ByteString data QueryRep Strict :: TypeRep -> QueryRep Nullable :: TypeRep -> QueryRep Check :: QueryRep NoValue :: QueryRep class Path a readPath :: Path a => Text -> Maybe a pathRep :: Path a => proxy a -> TypeRep readText :: Reader a -> Text -> (Maybe a) readTextInt :: Integral i => Text -> Maybe i readTextWord :: Integral i => Text -> Maybe i readTextDouble :: Text -> Maybe Double -- | javascript boolean. when "false", "0", "-0", "", "null", "undefined", -- "NaN" then False, else True. since 0.6.0.0. class Query a where queryRep = Strict . qTypeRep readQuery :: Query a => Maybe ByteString -> Maybe a queryRep :: Query a => proxy a -> QueryRep qTypeRep :: Query a => proxy a -> TypeRep readBS :: (ByteString -> Maybe (a, ByteString)) -> ByteString -> Maybe a readBSInt :: Integral a => ByteString -> Maybe a readBSWord :: Integral a => ByteString -> Maybe a readBSDouble :: ByteString -> Maybe Double -- | javascript boolean. when "false", "0", "-0", "", "null", "undefined", -- "NaN" then False, else True. since 0.6.0.0. -- | fuzzy date parse. three decimal split by 1 char. if year < 100 then -- + 2000. since 0.16.0. -- -- example: -- -- -- | fuzzy date parse. three decimal split by 1 char. if year < 100 then -- + 2000. since 0.16.0. -- -- example: -- -- -- | allow no parameter. but check parameter type. -- | always success. for check existence. pBool :: Proxy Bool pInt :: Proxy Int pInt8 :: Proxy Int8 pInt16 :: Proxy Int16 pInt32 :: Proxy Int32 pInt64 :: Proxy Int64 pInteger :: Proxy Integer pWord :: Proxy Word pWord8 :: Proxy Word8 pWord16 :: Proxy Word16 pWord32 :: Proxy Word32 pWord64 :: Proxy Word64 pDouble :: Proxy Double pFloat :: Proxy Float pText :: Proxy Text pLazyText :: Proxy Text pByteString :: Proxy ByteString pLazyByteString :: Proxy ByteString pString :: Proxy String pVoid :: Proxy () pMaybe :: proxy a -> Proxy (Maybe a) pFile :: Proxy File class ReqParam a reqParams :: ReqParam a => proxy a -> Request -> [Param] -> [File] -> [(ByteString, Maybe a)] reqParamRep :: ReqParam a => proxy a -> QueryRep instance [overlap ok] Typeable Text instance [overlap ok] Typeable File instance [overlap ok] Show File instance [overlap ok] Eq File instance [overlap ok] Show QueryRep instance [overlap ok] Eq QueryRep instance [overlap ok] Query a => ReqParam a instance [overlap ok] ReqParam File instance [overlap ok] Query () instance [overlap ok] Query a => Query (Maybe a) instance [overlap ok] Path Day instance [overlap ok] Query Day instance [overlap ok] Query String instance [overlap ok] Query ByteString instance [overlap ok] Query ByteString instance [overlap ok] Query Text instance [overlap ok] Query Text instance [overlap ok] Query Float instance [overlap ok] Query Double instance [overlap ok] Query Word64 instance [overlap ok] Query Word32 instance [overlap ok] Query Word16 instance [overlap ok] Query Word8 instance [overlap ok] Query Word instance [overlap ok] Query Integer instance [overlap ok] Query Int64 instance [overlap ok] Query Int32 instance [overlap ok] Query Int16 instance [overlap ok] Query Int8 instance [overlap ok] Query Int instance [overlap ok] Query Bool instance [overlap ok] Path String instance [overlap ok] Path ByteString instance [overlap ok] Path ByteString instance [overlap ok] Path Text instance [overlap ok] Path Text instance [overlap ok] Path Float instance [overlap ok] Path Double instance [overlap ok] Path Word64 instance [overlap ok] Path Word32 instance [overlap ok] Path Word16 instance [overlap ok] Path Word8 instance [overlap ok] Path Word instance [overlap ok] Path Integer instance [overlap ok] Path Int64 instance [overlap ok] Path Int32 instance [overlap ok] Path Int16 instance [overlap ok] Path Int8 instance [overlap ok] Path Int instance [overlap ok] Path Bool instance [overlap ok] Path Char module Data.Apiary.Document data StrategyRep StrategyRep :: Text -> StrategyRep strategyInfo :: StrategyRep -> Text data Doc DocPath :: Text -> Doc -> Doc DocRoot :: Doc -> Doc DocFetch :: TypeRep -> (Maybe Html) -> Doc -> Doc DocDropNext :: Doc -> Doc DocMethod :: Method -> Doc -> Doc DocQuery :: ByteString -> StrategyRep -> QueryRep -> (Maybe Html) -> Doc -> Doc DocPrecondition :: Html -> Doc -> Doc DocGroup :: Text -> Doc -> Doc Document :: Text -> Doc -> Doc Action :: Doc data Route Path :: Text -> Route -> Route Fetch :: TypeRep -> (Maybe Html) -> Route -> Route End :: Route data Documents Documents :: [PathDoc] -> [(Text, [PathDoc])] -> Documents noGroup :: Documents -> [PathDoc] groups :: Documents -> [(Text, [PathDoc])] data PathDoc PathDoc :: Route -> [(Method, [MethodDoc])] -> PathDoc path :: PathDoc -> Route methods :: PathDoc -> [(Method, [MethodDoc])] data QueryDoc QueryDoc :: ByteString -> StrategyRep -> QueryRep -> (Maybe Html) -> QueryDoc queryName :: QueryDoc -> ByteString queryStrategy :: QueryDoc -> StrategyRep queryRep :: QueryDoc -> QueryRep queryDocument :: QueryDoc -> (Maybe Html) data MethodDoc MethodDoc :: [QueryDoc] -> [Html] -> Text -> MethodDoc queries :: MethodDoc -> [QueryDoc] preconditions :: MethodDoc -> [Html] document :: MethodDoc -> Text docToDocument :: Doc -> Maybe (Maybe Text, PathDoc) mergePathDoc :: [PathDoc] -> [PathDoc] mergeMethods :: [(Method, [MethodDoc])] -> [(Method, [MethodDoc])] docsToDocuments :: [Doc] -> Documents instance Show StrategyRep instance Eq StrategyRep instance Eq Route module Control.Monad.Apiary.Filter.Internal.Strategy class Strategy (w :: * -> *) where type family SNext w (as :: [*]) a :: [*] readStrategy :: Strategy w => (v -> Maybe a) -> ((k, v) -> Bool) -> w a -> [(k, v)] -> SList as -> Maybe (SList (SNext w as a)) strategyRep :: Strategy w => w a -> StrategyRep getQuery :: (v -> Maybe a) -> w a -> ((k, v) -> Bool) -> [(k, v)] -> [Maybe a] -- | get first matched key( [0,) params to Type.). since 0.5.0.0. data Option a Option :: Option a data Optional a Optional :: Text -> a -> Optional a -- | get first matched key ( [1,) params to Maybe Type.) since 0.5.0.0. data First a First :: First a -- | get key ( [1,1] param to Type.) since 0.5.0.0. data One a One :: One a -- | get parameters ( [0,) params to [Type] ) since 0.5.0.0. data Many a Many :: Many a -- | get parameters ( [1,) params to [Type] ) since 0.5.0.0. data Some a Some :: Some a -- | get parameters with upper limit ( [1,n] to [Type]) since 0.6.0.0. data LimitSome a LimitSome :: {-# UNPACK #-} !Int -> LimitSome a -- | type check ( [0,) params to No argument ) since 0.5.0.0. data Check a Check :: Check a -- | construct Option proxy. since 0.5.1.0. pOption :: proxy a -> Option a -- | construct Optional proxy. since 0.16.0. pOptional :: Show a => a -> Optional a -- | construct First proxy. since 0.5.1.0. pFirst :: proxy a -> First a -- | construct One proxy. since 0.5.1.0. pOne :: proxy a -> One a -- | construct Many proxy. since 0.5.1.0. pMany :: proxy a -> Many a -- | construct Some proxy. since 0.5.1.0. pSome :: proxy a -> Some a -- | construct LimitSome proxy. since 0.16.0. pLimitSome :: Int -> proxy a -> LimitSome a -- | construct Check proxy. since 0.5.1.0. pCheck :: proxy a -> Check a instance Typeable Option instance Typeable Optional instance Typeable First instance Typeable One instance Typeable Many instance Typeable Some instance Typeable LimitSome instance Typeable Check instance Strategy Check instance Strategy LimitSome instance Strategy Some instance Strategy Many instance Strategy One instance Strategy First instance Strategy Optional instance Strategy Option module Data.Apiary.Document.Html routeToHtml :: Route -> (Text, Html, Html) data DefaultDocumentConfig DefaultDocumentConfig :: Text -> Maybe Html -> Bool -> Maybe Text -> DefaultDocumentConfig documentTitle :: DefaultDocumentConfig -> Text documentDescription :: DefaultDocumentConfig -> Maybe Html documentUseCDN :: DefaultDocumentConfig -> Bool -- | google analytics. since 0.17.0. documentGoogleAnalytics :: DefaultDocumentConfig -> Maybe Text analytics :: Text -> Html defaultDocumentToHtml :: DefaultDocumentConfig -> Documents -> Html -- | construct Html as route parameter. since 0.13.0. rpHtml :: Html -> Int -> Html instance Default DefaultDocumentConfig module Control.Monad.Apiary.Action data ActionT exts m a data ApiaryConfig ApiaryConfig :: Application -> Status -> ResponseHeaders -> Status -> ResponseHeaders -> [Text] -> (FilePath -> ByteString) -> ApiaryConfig -- | call when no handler matched. notFound :: ApiaryConfig -> Application -- | used unless call status function. defaultStatus :: ApiaryConfig -> Status -- | initial headers. defaultHeaders :: ApiaryConfig -> ResponseHeaders failStatus :: ApiaryConfig -> Status failHeaders :: ApiaryConfig -> ResponseHeaders -- | used by root filter. rootPattern :: ApiaryConfig -> [Text] mimeType :: ApiaryConfig -> FilePath -> ByteString defaultDocumentationAction :: Monad m => DefaultDocumentConfig -> ActionT exts m () data DefaultDocumentConfig DefaultDocumentConfig :: Text -> Maybe Html -> Bool -> Maybe Text -> DefaultDocumentConfig documentTitle :: DefaultDocumentConfig -> Text documentDescription :: DefaultDocumentConfig -> Maybe Html documentUseCDN :: DefaultDocumentConfig -> Bool -- | google analytics. since 0.17.0. documentGoogleAnalytics :: DefaultDocumentConfig -> Maybe Text -- | stop handler and send current state. since 0.3.3.0. stop :: Monad m => ActionT exts m a -- | stop with response. since 0.4.2.0. stopWith :: Monad m => Response -> ActionT exts m a -- | get raw request. since 0.1.0.0. getRequest :: Monad m => ActionT exts m Request -- | get all request headers. since 0.6.0.0. getHeaders :: Monad m => ActionT exts m RequestHeaders -- | parse request body and return params. since 0.9.0.0. getReqParams :: MonadIO m => ActionT exts m [Param] data File File :: ByteString -> ByteString -> ByteString -> ByteString -> File fileParameter :: File -> ByteString fileName :: File -> ByteString fileContentType :: File -> ByteString fileContent :: File -> ByteString -- | parse request body and return files. since 0.9.0.0. getReqFiles :: MonadIO m => ActionT exts m [File] getExt :: (Has e exts, Monad m) => proxy e -> ActionT exts m e -- | set status code. since 0.1.0.0. status :: Monad m => Status -> ActionT exts m () -- | add response header. since 0.1.0.0. addHeader :: Monad m => HeaderName -> ByteString -> ActionT exts m () -- | set response headers. since 0.1.0.0. setHeaders :: Monad m => ResponseHeaders -> ActionT exts m () -- | modify response header. since 0.1.0.0. modifyHeader :: Monad m => (ResponseHeaders -> ResponseHeaders) -> ActionT exts m () type ContentType = ByteString -- | set content-type header. if content-type header already exists, -- replace it. since 0.1.0.0. contentType :: Monad m => ContentType -> ActionT exts m () -- | reset response body to no response. since v0.15.2. reset :: Monad m => ActionT exts m () -- | set response body file content and detect Content-Type by extension. -- since 0.1.0.0. file :: Monad m => FilePath -> Maybe FilePart -> ActionT exts m () -- | set response body file content, without set Content-Type. since -- 0.1.0.0. file' :: Monad m => FilePath -> Maybe FilePart -> ActionT exts m () -- | append response body from builder. since 0.1.0.0. builder :: Monad m => Builder -> ActionT exts m () -- | append response body from strict bytestring. since 0.15.2. bytes :: Monad m => ByteString -> ActionT exts m () -- | append response body from lazy bytestring. since 0.15.2. lazyBytes :: Monad m => ByteString -> ActionT exts m () -- | append response body from strict text. encoding UTF-8. since 0.15.2. text :: Monad m => Text -> ActionT exts m () -- | append response body from lazy text. encoding UTF-8. since 0.15.2. lazyText :: Monad m => Text -> ActionT exts m () -- | append response body from show. encoding UTF-8. since 0.15.2. showing :: (Monad m, Show a) => a -> ActionT exts m () -- | append response body from string. encoding UTF-8. since 0.15.2. string :: Monad m => String -> ActionT exts m () -- | append response body from char. encoding UTF-8. since 0.15.2. char :: Monad m => Char -> ActionT exts m () -- | set response body source. since 0.9.0.0. stream :: Monad m => StreamingBody -> ActionT exts m () -- | set raw response constructor. since 0.10. -- -- example(use pipes-wai) -- --
--   producer :: Monad m => Producer (Flush Builder) IO () -> ActionT exts m ()
--   producer = response (s h -> responseProducer s h)
--   
rawResponse :: Monad m => (Status -> ResponseHeaders -> Response) -> ActionT exts m () -- | Represents a streaming HTTP response body. It's a function of two -- parameters; the first parameter provides a means of sending another -- chunk of data, and the second parameter provides a means of flushing -- the data to the client. -- -- Since 3.0.0 type StreamingBody = (Builder -> IO ()) -> IO () -> IO () -- | redirect with: -- -- 303 See Other (HTTP/1.1) or 302 Moved Temporarily (Other) -- -- since 0.6.2.0. redirect :: Monad m => ByteString -> ActionT exts m () -- | redirect with 301 Moved Permanently. since 0.3.3.0. redirectPermanently :: Monad m => ByteString -> ActionT exts m () -- | redirect with: -- -- 307 Temporary Redirect (HTTP/1.1) or 302 Moved Temporarily (Other) -- -- since 0.3.3.0. redirectTemporary :: Monad m => ByteString -> ActionT exts m () -- | redirect handler -- -- set status and add location header. since 0.3.3.0. -- -- rename from redirect in 0.6.2.0. redirectWith :: Monad m => Status -> ByteString -> ActionT exts m () -- | redirect with 302 Found. since 0.3.3.0. -- | Deprecated: use redirect redirectFound :: Monad m => ByteString -> ActionT exts m () -- | redirect with 303 See Other. since 0.3.3.0. -- | Deprecated: use redirect redirectSeeOther :: Monad m => ByteString -> ActionT exts m () -- | Deprecated: use stream source :: Monad m => StreamingBody -> ActionT exts m () -- | append response body from lazy bytestring. since 0.1.0.0. -- | Deprecated: use lazyBytes lbs :: Monad m => ByteString -> ActionT exts m () module Control.Monad.Apiary.Filter.Internal -- | low level filter function. function :: Monad actM => (Doc -> Doc) -> (SList prms -> Request -> Maybe (SList prms')) -> ApiaryT exts prms' actM m () -> ApiaryT exts prms actM m () -- | filter and append argument. function' :: Monad actM => (Doc -> Doc) -> (Request -> Maybe prm) -> ApiaryT exts (prm : prms) actM m () -> ApiaryT exts prms actM m () -- | filter only(not modify arguments). function_ :: Monad actM => (Doc -> Doc) -> (Request -> Bool) -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | filter by action. since 0.6.1.0. focus :: Monad actM => (Doc -> Doc) -> (SList prms -> ActionT exts actM (SList prms')) -> ApiaryT exts prms' actM m () -> ApiaryT exts prms actM m () module Control.Monad.Apiary.Filter -- | filter by HTTP method. since 0.1.0.0. -- --
--   method GET      -- stdmethod
--   method "HOGE" -- non standard method
--   
method :: Monad actM => Method -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | http version filter. since 0.5.0.0. httpVersion :: Monad actM => HttpVersion -> Html -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | http/0.9 only accepted fiter. since 0.5.0.0. http09 :: Monad actM => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | http/1.0 only accepted fiter. since 0.5.0.0. http10 :: Monad actM => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | http/1.1 only accepted fiter. since 0.5.0.0. http11 :: Monad actM => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | filter by rootPattern of ApiaryConfig. root :: (Monad m, Monad actM) => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | capture QuasiQuoter. since 0.1.0.0. -- -- example: -- --
--   [capture|/path|] -- first path == "path"
--   [capture|/int/:Int|] -- first path == "int" && get 2nd path as Int.
--   [capture|/:Int/:Double|] -- get first path as Int and get 2nd path as Double.
--   [capture|/**|] -- feed greedy and get all path as [Text] (since 0.17.0). 
--   
capture :: QuasiQuoter -- | check first path and drill down. since 0.11.0. path :: Monad actM => Text -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | check consumed paths. since 0.11.1. endPath :: Monad actM => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | get first path and drill down. since 0.11.0. fetch :: (Path p, Monad actM) => proxy p -> Maybe Html -> ApiaryT exts (p : prms) actM m () -> ApiaryT exts prms actM m () data QueryKey QueryKey :: ByteString -> Maybe Html -> QueryKey queryKey :: QueryKey -> ByteString queryDesc :: QueryKey -> Maybe Html (??) :: QueryKey -> Html -> QueryKey -- | low level query getter. since 0.5.0.0. -- --
--   query "key" (Proxy :: Proxy (fetcher type))
--   
-- -- examples: -- --
--   query "key" (First  :: First Int) -- get first 'key' query parameter as Int.
--   query "key" (Option :: Option (Maybe Int)) -- get first 'key' query parameter as Int. allow without param or value.
--   query "key" (Many   :: Many String) -- get all 'key' query parameter as String.
--   
query :: (ReqParam a, Strategy w, MonadIO actM) => QueryKey -> w a -> ApiaryT exts (SNext w prms a) actM m () -> ApiaryT exts prms actM m () -- | get first matched paramerer. since 0.5.0.0. -- --
--   "key" =: pInt == query "key" (pFirst pInt) == query "key" (First :: First Int)
--   
(=:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts (p : prms) actM m () -> ApiaryT exts prms actM m () -- | get one matched paramerer. since 0.5.0.0. -- -- when more one parameger given, not matched. -- --
--   "key" =: pInt == query "key" (pOne pInt) == query "key" (One :: One Int)
--   
(=!:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts (p : prms) actM m () -> ApiaryT exts prms actM m () -- | get optional first paramerer. since 0.5.0.0. -- -- when illegal type parameter given, fail match(don't give Nothing). -- --
--   "key" =: pInt == query "key" (pOption pInt) == query "key" (Option :: Option Int)
--   
(=?:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts (Maybe p : prms) actM m () -> ApiaryT exts prms actM m () -- | get optional first paramerer with default. since 0.16.0. -- -- when illegal type parameter given, fail match(don't give Nothing). -- --
--   "key" =: (0 :: Int) == query "key" (pOptional (0 :: Int)) == query "key" (Optional 0 :: Optional Int)
--   
(=?!:) :: (MonadIO actM, ReqParam p, Show p) => QueryKey -> p -> ApiaryT exts (p : prms) actM m () -> ApiaryT exts prms actM m () -- | check parameger given and type. since 0.5.0.0. -- -- If you wan't to allow any type, give pVoid. -- --
--   "key" =: pInt == query "key" (pCheck pInt) == query "key" (Check :: Check Int)
--   
(?:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | get many paramerer. since 0.5.0.0. -- --
--   "key" =: pInt == query "key" (pMany pInt) == query "key" (Many :: Many Int)
--   
(=*:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts ([p] : prms) actM m () -> ApiaryT exts prms actM m () -- | get some paramerer. since 0.5.0.0. -- --
--   "key" =: pInt == query "key" (pSome pInt) == query "key" (Some :: Some Int)
--   
(=+:) :: (MonadIO actM, ReqParam p) => QueryKey -> proxy p -> ApiaryT exts ([p] : prms) actM m () -> ApiaryT exts prms actM m () -- | query exists checker. -- --
--   hasQuery q = query q (Check :: Check ())
--   
hasQuery :: MonadIO actM => QueryKey -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | get existance of key only query parameter. since v0.17.0. switchQuery :: Monad actM => QueryKey -> ApiaryT exts (Bool : prms) actM m () -> ApiaryT exts prms actM m () -- | check whether to exists specified header or not. since 0.6.0.0. hasHeader :: Monad actM => HeaderName -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | check whether to exists specified valued header or not. since 0.6.0.0. eqHeader :: Monad actM => HeaderName -> ByteString -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | filter by headers up to 100 entries. since 0.6.0.0. headers :: Monad actM => HeaderName -> ApiaryT exts ([ByteString] : prms) actM m () -> ApiaryT exts prms actM m () -- | filter by header and get first. since 0.6.0.0. header :: Monad actM => HeaderName -> ApiaryT exts (ByteString : prms) actM m () -> ApiaryT exts prms actM m () -- | low level header filter. since 0.6.0.0. header' :: (Strategy w, Monad actM) => (forall x. Proxy x -> w x) -> (Header -> Bool) -> Maybe Html -> ApiaryT exts (SNext w prms ByteString) actM m () -> ApiaryT exts prms actM m () -- | require Accept header and set response Content-Type. since 0.16.0. accept :: Monad actM => ContentType -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | filter by ssl accessed. since 0.1.0.0. ssl :: Monad actM => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | filter by HTTP method using StdMethod. since 0.1.0.0. -- | Deprecated: use method stdMethod :: Monad actM => Method -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | match all subsequent path. since 0.15.0. -- | Deprecated: use greedy filter [capture|/**|] or use restPath. anyPath :: (Monad m, Monad actM) => ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () instance IsString QueryKey module Control.Monad.Apiary -- | most generic Apiary monad. since 0.8.0.0. data ApiaryT exts prms actM m a type EApplication e m = Extensions e -> m Application server :: Monad m => (Application -> m a) -> EApplication [] m -> m a serverWith :: Monad m => Initializer m [] exts -> (Application -> m a) -> (EApplication exts m) -> m a runApiaryT :: (Monad actM, Monad m) => (forall b. actM b -> IO b) -> ApiaryConfig -> ApiaryT exts [] actM m () -> EApplication exts m runApiary :: Monad m => ApiaryConfig -> ApiaryT exts [] IO m () -> EApplication exts m apiaryConfig :: Monad actM => ApiaryT exts prms actM m ApiaryConfig apiaryExt :: (Has e exts, Monad actM) => proxy e -> ApiaryT exts prms actM m e -- | splice ActionT ApiaryT. action :: Monad actM => Fn prms (ActionT exts actM ()) -> ApiaryT exts prms actM m () -- | like action. but not apply arguments. since 0.8.0.0. action' :: Monad actM => (SList prms -> ActionT exts actM ()) -> ApiaryT exts prms actM m () middleware :: Monad actM => Middleware -> ApiaryT exts prms actM m () -- | API document group. since 0.12.0.0. -- -- only top level group recognized. group :: Text -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | add API document. since 0.12.0.0. -- -- It use only filters prior document, so you should be placed document -- directly in front of action. document :: Text -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | add user defined precondition. since 0.13.0. precondition :: Html -> ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () noDoc :: ApiaryT exts prms actM m () -> ApiaryT exts prms actM m () -- | construct Html as route parameter. since 0.13.0. rpHtml :: Html -> Int -> Html -- | execute action before main action. since 0.4.2.0 -- | Deprecated: use action' actionWithPreAction :: Monad actM => (SList xs -> ActionT exts actM a) -> Fn xs (ActionT exts actM ()) -> ApiaryT exts xs actM m () module Web.Apiary.Heroku data Heroku data HerokuConfig HerokuConfig :: Int -> String -> Maybe String -> HerokuConfig defaultPort :: HerokuConfig -> Int herokuExecutableName :: HerokuConfig -> String herokuAppName :: HerokuConfig -> Maybe String -- | use this function instead of server in heroku app. since 0.17.0. -- --
--   server (run 3000) . runApiary def $ foo
--   
-- -- to -- --
--   heroku run def . runApiary def $ foo
--   
-- -- this function provide: -- -- heroku :: MonadIO m => (Int -> Application -> m a) -> HerokuConfig -> EApplication '[Heroku] m -> m a -- | use this function instead of serverWith in heroku app. since 0.17.0. -- --
--   serverWith exts (run 3000) . runApiary def $ foo
--   
-- -- to -- --
--   herokuWith exts run def . runApiary def $ foo
--   
herokuWith :: MonadIO m => Initializer m '[Heroku] exts -> (Int -> Application -> m a) -> HerokuConfig -> EApplication exts m -> m a getHerokuEnv :: Has Heroku exts => Text -> Extensions exts -> IO (Maybe Text) getHerokuEnv' :: Text -> Heroku -> IO (Maybe Text) instance Default HerokuConfig module Web.Apiary -- | shortcut action. since 0.6.0.0. -- --
--   [act|200 .html|] == [act|200 text/html|] ==
--   action $ \arguments -> do
--       status 200
--       contentType "text/html"
--   
-- | Deprecated: no longer maintained act :: QuasiQuoter