streaming-commons 0.1.7.2 → 0.1.7.3
raw patch · 6 files changed
+9/−33 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/Streaming/Blaze.hs +0/−2
- Data/Streaming/Network.hs +3/−9
- Data/Streaming/Network/Internal.hs +0/−15
- Data/Streaming/Text.hs +5/−5
- Data/Streaming/Zlib.hs +0/−1
- streaming-commons.cabal +1/−1
Data/Streaming/Blaze.hs view
@@ -38,8 +38,6 @@ ) where import Data.IORef-import Control.Monad (unless, liftM)-import Control.Monad.Trans.Class (lift, MonadTrans) import qualified Data.ByteString as S
Data/Streaming/Network.hs view
@@ -71,7 +71,7 @@ , safeRecv , runTCPServer , runTCPClient- , ConnectionHandle (..)+ , ConnectionHandle() , runTCPServerWithHandle -- ** UDP , bindPortUDP@@ -102,7 +102,7 @@ import Control.Concurrent (forkIO) import Control.Monad (forever) import Data.IORef (IORef, newIORef, atomicModifyIORef)-import Data.Array.Unboxed ((!), UArray, bounds, listArray)+import Data.Array.Unboxed ((!), UArray, listArray) import System.IO.Unsafe (unsafePerformIO) import System.Random (randomRIO) #if WINDOWS@@ -188,7 +188,7 @@ -- Since 0.1.1 bindRandomPortGen :: SocketType -> HostPreference -> IO (Int, Socket) bindRandomPortGen sockettype s =- loop 30+ loop (30 :: Int) where loop cnt = do port <- getUnassignedPort@@ -465,12 +465,6 @@ setPort :: HasPort a => Int -> a -> a setPort p = runIdentity . portLens (const (Identity p))--setHostPref :: HostPreference -> ServerSettings -> ServerSettings-setHostPref hp ss = ss { serverHost = hp }--getHostPref :: ServerSettings -> HostPreference-getHostPref = serverHost setHost :: ByteString -> ClientSettings -> ClientSettings setHost hp ss = ss { clientHost = hp }
Data/Streaming/Network/Internal.hs view
@@ -59,26 +59,11 @@ deriving (Eq, Ord, Show, Read) instance IsString HostPreference where- -- The funny code coming up is to get around some irritating warnings from- -- GHC. I should be able to just write:- {- fromString "*" = HostAny fromString "*4" = HostIPv4 fromString "!4" = HostIPv4Only fromString "*6" = HostIPv6 fromString "!6" = HostIPv6Only- -}- fromString s'@('*':s) =- case s of- [] -> HostAny- ['4'] -> HostIPv4- ['6'] -> HostIPv6- _ -> Host s'- fromString s'@('!':s) =- case s of- ['4'] -> HostIPv4Only- ['6'] -> HostIPv6Only- _ -> Host s' fromString s = Host s #if !WINDOWS
Data/Streaming/Text.hs view
@@ -55,7 +55,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Array as A-import Data.Text.Internal (textP)+import Data.Text.Internal (text) import qualified Data.Text.Internal.Encoding.Utf16 as U16 import qualified Data.Text.Internal.Encoding.Utf32 as U32 import qualified Data.Text.Internal.Encoding.Utf8 as U8@@ -92,7 +92,7 @@ getText :: Int -> A.MArray s -> ST s Text getText j marr = do arr <- A.unsafeFreeze marr- return $! textP arr 0 j+ return $! text arr 0 j {-# INLINE getText #-} #include "text_cbits.h"@@ -105,7 +105,7 @@ newtype CodePoint = CodePoint Word32 deriving (Eq, Show, Num, Storable) newtype DecoderState = DecoderState Word32 deriving (Eq, Show, Num, Storable) --- | /O(n)/ Convert a lazy 'ByteString' into a 'Stream Char', using+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using -- UTF-8 encoding. decodeUtf8 :: B.ByteString -> DecodeResult decodeUtf8 = decodeChunk B.empty 0 0@@ -138,7 +138,7 @@ n <- peek destOffPtr chunkText <- unsafeSTToIO $ do arr <- A.unsafeFreeze dest- return $! textP arr 0 (fromIntegral n)+ return $! text arr 0 (fromIntegral n) lastPtr <- peek curPtrPtr let left = lastPtr `minusPtr` curPtr -- The logic here is: if any text was generated, then the@@ -159,7 +159,7 @@ $! decodeChunkCheck unused codepoint state in loop (ptr `plusPtr` off) --- | /O(n)/ Convert a lazy 'ByteString' into a 'Stream Char', using+-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using -- UTF-8 encoding. decodeUtf8Pure :: B.ByteString -> DecodeResult decodeUtf8Pure =
Data/Streaming/Zlib.hs view
@@ -49,7 +49,6 @@ import Codec.Compression.Zlib (WindowBits(WindowBits), defaultWindowBits) import qualified Data.ByteString as S import Data.ByteString.Lazy.Internal (defaultChunkSize)-import Control.Monad (when) import Data.Typeable (Typeable) import Control.Exception (Exception)
streaming-commons.cabal view
@@ -1,5 +1,5 @@ name: streaming-commons-version: 0.1.7.2+version: 0.1.7.3 synopsis: Common lower-level functions needed by various streaming data libraries description: Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes. homepage: https://github.com/fpco/streaming-commons