packages feed

servant-streaming (empty) → 0.2.0.0

raw patch · 5 files changed

+115/−0 lines, 5 filesdep +QuickCheckdep +basedep +hspecsetup-changed

Dependencies added: QuickCheck, base, hspec, http-types, servant, servant-streaming

Files

+ LICENSE view
@@ -0,0 +1,31 @@+Copyright Julian K. Arni (c) 2015++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Julian K. Arni nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ servant-streaming.cabal view
@@ -0,0 +1,55 @@+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: 74ed850a5125af30d91d2e9b3c6a8b357a3a093de9f73f39f7a126043b33983c++name:           servant-streaming+version:        0.2.0.0+synopsis:       Servant combinators for the 'streaming' package+description:    This package defines the 'StreamBody' and 'StreamResponse' combinators for use with the <https://hackage.haskell.org/package/streaming streaming> package.+homepage:       http://github.com/plow-technologies/servant-streaming#readme+bug-reports:    https://github.com/plow-technologies/servant-streaming/issues+author:         Julian K. Arni+maintainer:     jkarni@gmail.com+copyright:      (c) Julian K. Arni+license:        BSD3+license-file:   LICENSE+tested-with:    GHC == 8.2.2+build-type:     Simple+cabal-version:  >= 1.10++source-repository head+  type: git+  location: https://github.com/plow-technologies/servant-streaming++library+  hs-source-dirs:+      src+  default-extensions: AutoDeriveTypeable ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables TypeFamilies TypeOperators+  ghc-options: -Wall+  build-depends:+      base >=4.7 && <4.11+    , http-types >=0.9 && <0.13+    , servant >=0.8 && <0.14+  exposed-modules:+      Servant.Streaming+  default-language: Haskell2010++test-suite spec+  type: exitcode-stdio-1.0+  main-is: Spec.hs+  hs-source-dirs:+      test+  default-extensions: AutoDeriveTypeable ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables TypeFamilies TypeOperators+  ghc-options: -Wall+  build-depends:+      QuickCheck >=2.8 && <2.11+    , base >=4.7 && <4.11+    , hspec >2 && <3+    , http-types >=0.9 && <0.13+    , servant >=0.8 && <0.14+    , servant-streaming+  other-modules:+      Paths_servant_streaming+  default-language: Haskell2010
+ src/Servant/Streaming.hs view
@@ -0,0 +1,26 @@+module Servant.Streaming where++import GHC.TypeLits (Nat)+import Network.HTTP.Types++-- | A request body that should be streamed.+type StreamBody ct = StreamBodyMonad ct IO++-- | A request body that should be streamed with specified server monad+data StreamBodyMonad (contentTypes :: [*]) (m :: * -> *)++-- | A response body that should be streamed, with specified method, status,+-- and content-type.+data StreamResponse (method :: StdMethod) (status :: Nat)  (contentTypes :: [*])++-- | The streaming version of the @Get@ combinator.+type StreamResponseGet = StreamResponse 'GET 200++-- | The streaming version of the @Post@ combinator.+type StreamResponsePost = StreamResponse 'POST 200++-- | The streaming version of the @Put@ combinator.+type StreamResponsePut = StreamResponse 'PUT 200++-- | The streaming version of the @Patch@ combinator.+type StreamResponsePatch = StreamResponse 'PATCH 200
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}