-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Server instances for the 'servant-streaming' package.
--   
--   This package defines instances that allow using the <a>StreamBody</a>
--   and <a>StreamResponse</a> combinators in <a>servant</a> servers.
@package servant-streaming-server
@version 0.3.0.0

module Servant.Streaming.Server.Internal
instance (Servant.API.ContentTypes.AllMime contentTypes, Servant.Server.Internal.HasServer subapi ctx, Control.Monad.IO.Class.MonadIO n) => Servant.Server.Internal.HasServer (Servant.Streaming.StreamBodyMonad contentTypes n Servant.API.Sub.:> subapi) ctx
instance (GHC.TypeNats.KnownNat status, Servant.API.ContentTypes.AllMime contentTypes, Servant.API.Verbs.ReflectMethod method) => Servant.Server.Internal.HasServer (Servant.Streaming.StreamResponse method status contentTypes) ctx


-- | This module provides an instance for HasServant for
--   'servant-streaming' combinators, so that servers with streaming
--   (requests or responses) may be used.
--   
--   As as convenience, it also re-exports the combinators themselves.
module Servant.Streaming.Server

-- | A response body that should be streamed, with specified method,
--   status, and content-type.
data StreamResponse (method :: StdMethod) (status :: Nat) (contentTypes :: [*])

-- | A request body that should be streamed.
type StreamBody (ct :: [*]) = StreamBodyMonad ct IO

-- | The streaming version of the <tt>Get</tt> combinator.
type StreamResponseGet = StreamResponse GET 200

-- | The streaming version of the <tt>Post</tt> combinator.
type StreamResponsePost = StreamResponse POST 200

-- | The streaming version of the <tt>Put</tt> combinator.
type StreamResponsePut = StreamResponse PUT 200

-- | The streaming version of the <tt>Patch</tt> combinator.
type StreamResponsePatch = StreamResponse PATCH 200
