]> Git — Sourcephile - haskell/symantic-http.git/commitdiff
stack: bump to lts-14.13 master
authorJulien Moutinho <julm+symantic-http@autogeree.net>
Thu, 7 Nov 2019 05:07:45 +0000 (05:07 +0000)
committerJulien Moutinho <julm+symantic-http@autogeree.net>
Thu, 7 Nov 2019 05:07:45 +0000 (05:07 +0000)
20 files changed:
symantic-http-client/stack.yaml
symantic-http-client/symantic-http-client.cabal
symantic-http-demo/stack.yaml
symantic-http-demo/symantic-http-demo.cabal
symantic-http-doc/stack.yaml
symantic-http-doc/symantic-http-doc.cabal
symantic-http-pipes/Symantic/HTTP/Pipes.hs
symantic-http-pipes/stack.yaml
symantic-http-pipes/stack.yaml.lock [new file with mode: 0644]
symantic-http-pipes/symantic-http-pipes.cabal
symantic-http-server/Symantic/HTTP/Server.hs
symantic-http-server/stack.yaml
symantic-http-server/symantic-http-server.cabal
symantic-http-test/Hspec/Server/Router.hs
symantic-http-test/Hspec/Utils.hs
symantic-http-test/stack.yaml
symantic-http-test/stack.yaml.lock [new file with mode: 0644]
symantic-http-test/symantic-http-test.cabal
symantic-http/stack.yaml
symantic-http/symantic-http.cabal

index 213528dbd37845117d6a3c839d25240fb34f266d..a8c7fdc6cacba9529f67f8404fd0341030d48e54 100644 (file)
@@ -1,9 +1,6 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
index 9a2578855c7af0aec6ba7211ddb685425722057e..2910a8cd481c5ff137962137a48b33aaa1a3dcc2 100644 (file)
@@ -24,7 +24,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index d0e95cb76e65b0194bea511eac0f1707e24cd221..d5e0e2a090f41dce5cf5c193daeb8c13809e72e0 100644 (file)
@@ -1,15 +1,9 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
-- location: '../symantic-http-client'
-  extra-dep: true
-- location: '../symantic-http-pipes'
-  extra-dep: true
-- location: '../symantic-http-server'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
+- ../symantic-http-client
+- ../symantic-http-pipes
+- ../symantic-http-server
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
index 7569ca5811674cb9ad6a1e1d870372525f1ea6ec..40899b8bebdfacd9cce3994d42a703fc4d895662 100644 (file)
@@ -23,7 +23,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index 3a5d46848714bcbfccee5af299607862692830b7..4e0add3b5bb7b012c26633fa4682a7c07dd15ea4 100644 (file)
@@ -1,6 +1,3 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
index 864c6eaa77918959b8db5ae4ef51955659a057af..fa86dbbd67588bd1bf8ed7eb829d78241d398a00 100644 (file)
@@ -23,7 +23,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index bc8b27b83e83bca101f9f3a82cb5e66d8eec499f..7a98b460f7a254cf9b70d206ca1ef7141cef3fcd 100644 (file)
@@ -140,6 +140,7 @@ encodeNetstring mimeEnc a =
        BSL8.pack (show (BSL8.length bs))
         <> ":" <> bs <> ","
 
        BSL8.pack (show (BSL8.length bs))
         <> ":" <> bs <> ","
 
+-- TODO: write something like Pbs._lines to form a Lens'
 decodeNetstring ::
  IsString r =>
  Monad m =>
 decodeNetstring ::
  IsString r =>
  Monad m =>
@@ -190,21 +191,29 @@ drawByteP = P.hoist lift Pbs.drawByte
 unDrawP :: Monad m => inp -> ParserP inp out m ()
 unDrawP = P.hoist lift . Pp.unDraw
 
 unDrawP :: Monad m => inp -> ParserP inp out m ()
 unDrawP = P.hoist lift . Pp.unDraw
 
--- | @'parseMany' f@ groups a 'P.Producer' of 'BS.ByteString's
--- into a series of 'P.Producer's delimited by 'f',
--- where the delimiter is dropped.
+-- | @'parseMany' f@ groups a 'P.Producer' of @(inp)@
+-- into a series of 'P.Producer's of @(a)@ delimited by 'f'
+-- (which must drop the delimiter).
 parseMany ::
 parseMany ::
+ forall m inp r a.
  Monad m =>
  Monad m =>
- (P.Producer a m r -> P.Producer b m (P.Producer a m r)) ->
- P.Producer a m r ->
- Pg.FreeT (P.Producer b m) m r
-parseMany f = Pg.FreeT . go0
+ (P.Producer inp m r -> P.Producer a m (P.Producer inp m r)) ->
+ P.Producer inp m r ->
+ Pg.FreeT (P.Producer a m) m r
+parseMany f = go0
        where
        where
-       go0 p = do
+       go0 ::
+        P.Producer inp m r ->
+        Pg.FreeT (P.Producer a m) m r
+       go0 p = Pg.FreeT $ do
                P.next p >>= \case
                P.next p >>= \case
-                Left r -> return (Pg.Pure r)
-                Right (bs, p') -> return $ Pg.Free (go1 (P.yield bs >> p'))
-       go1 p = Pg.FreeT . go0 <$> f p
+                Left r -> return $ Pg.Pure r
+                Right (inp, p') -> return $ Pg.Free $ go1 $ P.yield inp >> p'
+       
+       go1 ::
+        P.Producer inp m r ->
+        P.Producer a m (Pg.FreeT (P.Producer a m) m r)
+       go1 p = go0 <$> f p
 
 {-
 -- * Type |Lens'|
 
 {-
 -- * Type |Lens'|
index 213528dbd37845117d6a3c839d25240fb34f266d..a8c7fdc6cacba9529f67f8404fd0341030d48e54 100644 (file)
@@ -1,9 +1,6 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
diff --git a/symantic-http-pipes/stack.yaml.lock b/symantic-http-pipes/stack.yaml.lock
new file mode 100644 (file)
index 0000000..1785172
--- /dev/null
@@ -0,0 +1,19 @@
+# This file was autogenerated by Stack.
+# You should not edit this file by hand.
+# For more information, please see the documentation at:
+#   https://docs.haskellstack.org/en/stable/lock_files
+
+packages:
+- completed:
+    hackage: monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f,2077
+    pantry-tree:
+      size: 1110
+      sha256: 7854dad860838df536897abe25cb020a685c788833c2c55f099040b73e05125b
+  original:
+    hackage: monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
+snapshots:
+- completed:
+    size: 525876
+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/13.yaml
+    sha256: 4a0e79eb194c937cc2a1852ff84d983c63ac348dc6bad5f38d20cab697036eef
+  original: lts-14.13
index 2ae9557fdda045a822395d5688995c93c62f859a..9f3a89a266a28ad791e166b84a33721390acc669 100644 (file)
@@ -25,7 +25,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index 6dec5fce3d2d712e33be0116896eb4d1c1245a9d..2a2a05e798bc4831cd995a75832a3f40292bfcf9 100644 (file)
@@ -691,7 +691,7 @@ instance HTTP_BodyStream Server where
                        case matchContent @ts @(MimeDecodable (FramingYield as)) reqContentType of
                         Nothing -> return $ Left $ Fail st [ServerErrorContentType]
                         Just (MimeType mt) -> do
                        case matchContent @ts @(MimeDecodable (FramingYield as)) reqContentType of
                         Nothing -> return $ Left $ Fail st [ServerErrorContentType]
                         Just (MimeType mt) -> do
-                               let bodyBS = Wai.requestBody $ serverState_request st
+                               let bodyBS = Wai.getRequestBodyChunk $ serverState_request st
                                return $ Right $ Right $ Right $
                                        Right ($ ServerBodyStreamArg $
                                                framingDecode (Proxy @framing) (mimeDecode mt) $
                                return $ Right $ Right $ Right $
                                        Right ($ ServerBodyStreamArg $
                                                framingDecode (Proxy @framing) (mimeDecode mt) $
index 213528dbd37845117d6a3c839d25240fb34f266d..a8c7fdc6cacba9529f67f8404fd0341030d48e54 100644 (file)
@@ -1,9 +1,6 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 nix:
   packages: [zlib]
index 8123f1169975a0d5e262436f5a3c25a352c1f05e..2519bcc054a8edbd217fadf56c3f4acdff5c51fd 100644 (file)
@@ -24,7 +24,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index 0704a5fd088f6f7424939ea63df674a057449f8f..0d5c81cdb1bcd3d3a614e096fa9a291a7fd24cc0 100644 (file)
@@ -7,16 +7,11 @@ module Hspec.Server.Router where
 
 import Control.Monad (unless)
 import Data.Bool
 
 import Control.Monad (unless)
 import Data.Bool
-import Data.Char (Char)
 import Data.Eq (Eq(..))
 import Data.Eq (Eq(..))
-import Data.Int (Int)
 import Data.String (String)
 import Data.String (String)
-import System.IO (IO, putStrLn)
 import Text.Show (Show(..))
 import Text.Show (Show(..))
-import qualified Control.Monad.Classes as MC
 import qualified Data.List as List
 import qualified Data.Map.Strict as Map
 import qualified Data.List as List
 import qualified Data.Map.Strict as Map
-import qualified Network.Wai.Handler.Warp as Warp
 import qualified Test.Hspec as Hspec
 
 import Symantic.HTTP
 import qualified Test.Hspec as Hspec
 
 import Symantic.HTTP
index 2bf1ad9cacf6f1ca14f2af4aaeb2ce427ffd973a..cee957fb8bfbf5025917c218cd0b0c9c775a9026 100644 (file)
@@ -24,7 +24,7 @@ import Data.Function (($), (.), id)
 import Data.Functor (Functor(..), (<$>))
 import System.IO (IO)
 import Test.Hspec
 import Data.Functor (Functor(..), (<$>))
 import System.IO (IO)
 import Test.Hspec
-import Test.Tasty
+import Test.Tasty hiding (after, after_)
 import Test.Tasty.Hspec
 import Text.Show (Show(..), showString, showParen, ShowS)
 import qualified Data.Map.Strict as Map
 import Test.Tasty.Hspec
 import Text.Show (Show(..), showString, showParen, ShowS)
 import qualified Data.Map.Strict as Map
index 85e1141008badd642269880e6f3b8db8d7f6bfda..e4da42dc878233c4b81e6d1b91319e00ebf00fec 100644 (file)
@@ -1,13 +1,7 @@
-resolver: lts-13.19
-packages:
-- '.'
-- location: '../symantic-http'
-  extra-dep: true
-- location: '../symantic-http-client'
-  extra-dep: true
-- location: '../symantic-http-pipes'
-  extra-dep: true
-- location: '../symantic-http-server'
-  extra-dep: true
+resolver: lts-14.13
 extra-deps:
 extra-deps:
+- ../symantic-http
+- ../symantic-http-client
+- ../symantic-http-pipes
+- ../symantic-http-server
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
 - monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
diff --git a/symantic-http-test/stack.yaml.lock b/symantic-http-test/stack.yaml.lock
new file mode 100644 (file)
index 0000000..1785172
--- /dev/null
@@ -0,0 +1,19 @@
+# This file was autogenerated by Stack.
+# You should not edit this file by hand.
+# For more information, please see the documentation at:
+#   https://docs.haskellstack.org/en/stable/lock_files
+
+packages:
+- completed:
+    hackage: monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f,2077
+    pantry-tree:
+      size: 1110
+      sha256: 7854dad860838df536897abe25cb020a685c788833c2c55f099040b73e05125b
+  original:
+    hackage: monad-classes-0.3.2.2@sha256:793faead28dafb47f115c4dec877ce3e3ffab604f134d852652385632ea0923f
+snapshots:
+- completed:
+    size: 525876
+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/13.yaml
+    sha256: 4a0e79eb194c937cc2a1852ff84d983c63ac348dc6bad5f38d20cab697036eef
+  original: lts-14.13
index 0c54b8f1c12f173623aa485cd92e3808ddc16f90..3228e9bacec5a22bc2c359c69ad5fc0c8ec7a548 100644 (file)
@@ -23,7 +23,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files:
index 72b0c71e6facb93f2635012f0f8bf8aa3502bc6c..1e0389a1b8006b6dfd7186ef2b0893d430984621 100644 (file)
@@ -1,4 +1 @@
-resolver: lts-13.19
-packages:
-- '.'
-extra-deps:
+resolver: lts-14.13
index e40435482917f60ade85e6114ee9378f198e0641..cd08dd7a39c267b104b53208b52a26729f2f7a67 100644 (file)
@@ -71,7 +71,7 @@ bug-reports: Julien Moutinho <julm+symantic-http@autogeree.net>
 
 build-type: Simple
 cabal-version: 1.24
 
 build-type: Simple
 cabal-version: 1.24
-tested-with: GHC==8.4.4
+tested-with: GHC==8.6.5
 extra-source-files:
   stack.yaml
 extra-tmp-files:
 extra-source-files:
   stack.yaml
 extra-tmp-files: