packages feed

sockets-and-pipes 0.3 → 1.0.0.0

raw patch · 2 files changed

+96/−226 lines, 2 filesdep +attoparsec-rundep +hash-addresseddep +mtldep −list-transformerdep ~aesondep ~asciidep ~async

Dependencies added: attoparsec-run, hash-addressed, mtl, pipes

Dependencies removed: list-transformer

Dependency ranges changed: aeson, ascii, async, attoparsec, base, blaze-html, bytestring, containers, filepath, relude, resourcet, text

Files

sockets-and-pipes.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name: sockets-and-pipes-version: 0.3+version: 1.0.0.0  synopsis: Support for the Sockets and Pipes book category: HTTP, Network, Streaming, Text@@ -10,88 +10,130 @@ license-file: license.txt  author: Chris Martin, Julie Moronuki-maintainer: Joy of Haskell <hello@joyofhaskell.com>--build-type: Simple+maintainer: Type Classes <hello@typeclasses.com>  description:-    This package contains some utilities that support /Sockets and Pipes/-    (available on <https://leanpub.com/sockets-and-pipes Leanpub>),-    as well as re-exports from all the libraries mentioned in the book.--    Please read the "SocketsAndPipes.Syllabus".--    This release is for the sixth draft of the book, released September 2022.+    This package re-exports from all the libraries mentioned in+    /Sockets and Pipes/ (available on <https://leanpub.com/sockets-and-pipes Leanpub>). -source-repository head-    type:     git-    location: git://github.com/joyofhaskell/sockets-and-pipes.git+    Version 1.* is for the first edition of the book, released May 2023.  library-    default-language: Haskell2010-    default-extensions: NoImplicitPrelude-    ghc-options: -Wall -fno-warn-unused-imports-    hs-source-dirs: src-    exposed-modules: SocketsAndPipes.Syllabus+    default-language: GHC2021 -    build-depends: ascii ^>= 1.2.3.0-    reexported-modules: ASCII, ASCII.Char, ASCII.Decimal+    build-depends: ascii ^>= 1.7+    reexported-modules:+      , ASCII+      , ASCII.Char+      , ASCII.Decimal -    build-depends: aeson ^>= 2.0-    reexported-modules: Data.Aeson, Data.Aeson.Key, Data.Aeson.KeyMap+    build-depends: aeson ^>= 2.1+    reexported-modules:+      , Data.Aeson+      , Data.Aeson.Key+      , Data.Aeson.KeyMap -    build-depends: async ^>= 2.2.2-    reexported-modules: Control.Concurrent.Async+    build-depends: async ^>= 2.2.4+    reexported-modules:+      , Control.Concurrent.Async -    build-depends: attoparsec ^>= 0.13 || ^>= 0.14-    reexported-modules: Data.Attoparsec.ByteString+    build-depends: attoparsec ^>= 0.14.4+    reexported-modules:+      , Data.Attoparsec.ByteString -    build-depends: base ^>= 4.14 || ^>= 4.15 || ^>= 4.16-    reexported-modules: Control.Concurrent, Control.Monad, Data.Char, Prelude, System.IO+    build-depends: attoparsec-run ^>= 0.0.2+    reexported-modules:+      , Data.Attoparsec.ByteString.Run -    build-depends: blaze-html ^>= 0.9-    reexported-modules: Text.Blaze.Html, Text.Blaze.Html5, Text.Blaze.Html5.Attributes, Text.Blaze.Html.Renderer.Utf8+    build-depends:  base ^>= 4.16 || ^>= 4.17+    reexported-modules:+      , Control.Concurrent+      , Control.Monad+      , Data.Char+      , Prelude+      , System.IO -    build-depends: bytestring ^>= 0.10 || ^>= 0.11-    reexported-modules: Data.ByteString, Data.ByteString.Builder, Data.ByteString.Char8, Data.ByteString.Lazy+    build-depends: blaze-html ^>= 0.9.1+    reexported-modules:+      , Text.Blaze.Html+      , Text.Blaze.Html.Renderer.Utf8+      , Text.Blaze.Html5+      , Text.Blaze.Html5.Attributes -    build-depends: containers ^>= 0.6.2.1-    reexported-modules: Data.Map.Strict+    build-depends: bytestring ^>= 0.11.3+    reexported-modules:+      , Data.ByteString+      , Data.ByteString.Builder+      , Data.ByteString.Char8+      , Data.ByteString.Lazy +    build-depends: containers ^>= 0.6.5+    reexported-modules:+      , Data.Map.Strict+     build-depends: directory ^>= 1.3.6-    reexported-modules: System.Directory+    reexported-modules:+      , System.Directory -    build-depends: filepath ^>= 1.4-    reexported-modules: System.FilePath+    build-depends: filepath ^>= 1.4.2+    reexported-modules:+      , System.FilePath -    build-depends: list-transformer ^>= 1.0.7-    reexported-modules: List.Transformer+    build-depends: hash-addressed ^>= 0.2+    reexported-modules:+      , HashAddressed.Directory+      , HashAddressed.HashFunction +    build-depends: mtl ^>= 2.2.2 || ^>= 2.3.1+    reexported-modules:+      , Control.Monad.Except+     build-depends: network ^>= 3.1.2-    reexported-modules: Network.Socket, Network.Socket.ByteString,+    reexported-modules:+      , Network.Socket+      , Network.Socket.ByteString      build-depends: network-simple ^>= 0.4.2-    reexported-modules: Network.Simple.TCP+    reexported-modules:+      , Network.Simple.TCP -    build-depends: relude ^>= 1.0 || ^>= 1.1-    reexported-modules: Relude+    build-depends: pipes ^>= 4.3.16+    reexported-modules:+      , Pipes -    build-depends: resourcet ^>= 1.2.4-    reexported-modules: Control.Monad.Trans.Resource+    build-depends: relude ^>= 1.1 || ^>= 1.2+    reexported-modules:+      , Relude +    build-depends: resourcet ^>= 1.2.5 || ^>= 1.3+    reexported-modules:+      , Control.Monad.Trans.Resource+     build-depends: safe-exceptions ^>= 0.1.7.0-    reexported-modules: Control.Exception.Safe+    reexported-modules:+      , Control.Exception.Safe      build-depends: stm ^>= 2.5-    reexported-modules: Control.Concurrent.STM, Control.Concurrent.STM.TVar, Control.Monad.STM+    reexported-modules:+      , Control.Concurrent.STM+      , Control.Concurrent.STM.TVar+      , Control.Monad.STM -    build-depends: text ^>= 1.2.4.1-    reexported-modules: Data.Text, Data.Text.Encoding, Data.Text.IO-    reexported-modules: Data.Text.Lazy, Data.Text.Lazy.Encoding, Data.Text.Lazy.IO-    reexported-modules: Data.Text.Lazy.Builder, Data.Text.Lazy.Builder.Int+    build-depends: text ^>= 1.2.5 || ^>= 2.0+    reexported-modules:+      , Data.Text+      , Data.Text.Encoding+      , Data.Text.IO+      , Data.Text.Lazy+      , Data.Text.Lazy.Builder+      , Data.Text.Lazy.Builder.Int+      , Data.Text.Lazy.Encoding+      , Data.Text.Lazy.IO      build-depends: time ^>= 1.10 || ^>= 1.11 || ^>= 1.12-    reexported-modules: Data.Time+    reexported-modules:+      , Data.Time      build-depends: unfork ^>= 1.0-    reexported-modules: Unfork+    reexported-modules:+      , Unfork
− src/SocketsAndPipes/Syllabus.hs
@@ -1,172 +0,0 @@-module SocketsAndPipes.Syllabus-  (-    -- * Chapters-    -- $chapters--    -- * Libraries-    -- $libraries-  )-  where--import Prelude ()--import qualified ASCII as A-import qualified Control.Concurrent as Concurrent-import qualified Control.Concurrent.Async as Async-import qualified Control.Concurrent.STM as STM-import qualified Control.Monad.Trans.Resource as Resource-import qualified Data.ByteString as BS-import qualified Data.ByteString.Builder as BSB-import qualified Data.Text as T-import qualified Data.Text.Lazy.Builder as TB-import qualified Data.Time as Time-import qualified Network.Simple.TCP as Net-import qualified Prelude--{- $chapters--List of modules that make a significant appearance in each chapter:--__Setup__--  * "Relude" - Alternate prelude that includes a lot of standard utilities-  * "System.Directory", "System.FilePath" - Determining where our data files should go--__1 - Handles__--  * "System.IO" - Writing to a file-  * "Control.Monad.Trans.Resource" - Using 'Resource.allocate' to ensure that file handles are closed--__2 - Chunks__--  * "Data.Text" - 'T.Text' is a chunk of characters-  * "Data.Text.IO" - Reading and writing files using 'T.Text' instead of 'Prelude.String'--__3 - Bytes__--  * "Data.ByteString" - 'BS.ByteString' is a chunk of bytes-  * "Data.Text.Encoding" - Conversions between 'BS.ByteString' and 'T.Text'--__4 - Sockets__--  * "Network.Socket" - Opening and closing sockets, resolving network addresses-  * "Network.Socket.ByteString" - Writing to and reading from sockets--__5 - HTTP__--  * "ASCII", "ASCII.Char" - Expressing HTTP messages as strings using the 'A.string' quasi-quoter-  * "Network.Simple.TCP" - Listening for client connections using 'Net.serve'--__6 - HTTP types__--  * "ASCII.Decimal", "Data.ByteString.Lazy" - Defining datatypes for the parts of an HTTP message--__7 - Encoding__--  * "Data.Text.Lazy",  "Data.Text.Lazy.Builder" - Efficient text concatenations with 'TB.Builder'-  * "Data.ByteString.Lazy", "Data.ByteString.Builder" - Efficient byte string concatenations with 'BSB.Builder'-  * "Data.Time" - Simple performance testing with 'Time.getCurrentTime' and 'Time.diffUTCTime'--__8 - Responding__--  * No additional imports in this chapter--__9 - Content types__--  * "Data.Text.Lazy.Builder.Int", "Data.Text.Lazy.IO",  "Data.Text.Lazy.Encoding" - Building a text response body-  * "Text.Blaze.Html", "Text.Blaze.Html5", "Text.Blaze.Html.Renderer.Utf8" - Building an HTML response body-  * "Data.Aeson", "Data.Aeson.Key", "Data.Aeson.KeyMap" - Building a JSON response body--__10 - Change__--  * "Control.Concurrent.STM" - Shared 'STM.TVar' state for request-handling threads-  * "Control.Concurrent.Async" - Demonstrating thread safety with 'Async.replicateConcurrently_'--__11 - Streaming__--  * "Control.Concurrent" - Slowing things down with 'Concurrent.threadDelay'--__12 - ListT IO__--  * "List.Transformer" - Representing files and chunked HTTP message bodies as I/O streams--__13 - Parsing__--  * "Data.Map.Strict" - Mapping resource names to file paths-  * "Data.Attoparsec.ByteString" - Parsing HTTP requests--__14 - Errors__--  * "Unfork" - Thread-safe logging--The remaining chapters are in progress:--__15 - Reading the head__--__16 - Reading the body__--__17 - Connection reuse__---}--{- $libraries--Re-exported modules, grouped by the package that each module originally comes from:--__ascii__ - "ASCII", "ASCII.Char", "ASCII.Decimal"--__aeson__ - "Data.Aeson", "Data.Aeson.Key", "Data.Aeson.KeyMap"--__async__ - "Control.Concurrent.Async"--__base__--  * File handles - "System.IO"-  * Fundamental data types - "Data.Char"-  * Miscellanea - "Control.Concurrent", "Control.Monad"--__blaze-html__ - "Text.Blaze.Html", "Text.Blaze.Html5", "Text.Blaze.Html5.Attributes", "Text.Blaze.Html.Renderer.Utf8"--__bytestring__--  * Strict - "Data.ByteString"-  * Lazy - "Data.ByteString.Lazy"-  * Builder - "Data.ByteString.Builder"-  * "Data.ByteString.Char8" - To discuss why we don't use it--__containers__ - "Data.Map.Strict"--__directory__ - "System.Directory"--__filepath__ - "System.FilePath"--__list-transformer__ - "List.Transformer"--__network__--  * "Network.Socket" - The Socket type, operations for opening and closing sockets-  * "Network.Socket.ByteString" - Socket read/write operations with strict byte strings--__network-simple__--  * "Network.Simple.TCP" - Sockets that listen for incoming client connections--__relude__ - "Relude"--__resourcet__ - "Control.Monad.Trans.Resource"--__safe-exceptions__ - "Control.Exception.Safe"--__stm__ - "Control.Monad.STM", "Control.Concurrent.STM", "Control.Concurrent.STM.TVar"--__text__--  * Strict - "Data.Text", "Data.Text.Encoding", "Data.Text.IO"-  * Lazy - "Data.Text.Lazy", "Data.Text.Lazy.Encoding", "Data.Text.Lazy.IO"-  * Builder - "Data.Text.Lazy.Builder", "Data.Text.Lazy.Builder.Int"--__time__ - "Data.Time"--__unfork__ - "Unfork"---}