packages feed

HTTP 4000.0.9 → 4000.0.10

raw patch · 3 files changed

+13/−5 lines, 3 filesdep ~basedep ~mtldep ~networknew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, mtl, network

API changes (from Hackage documentation)

- Network.StreamDebugger: instance (Stream x) => Stream (StreamDebugger x)
- Network.TCP: instance (Eq a) => Eq (Conn a)
- Network.TCP: instance (Eq ty) => Eq (StreamHooks ty)
+ Network.Stream: failMisc :: String -> Result a
+ Network.StreamDebugger: instance Stream x => Stream (StreamDebugger x)
+ Network.TCP: instance Eq a => Eq (Conn a)
+ Network.TCP: instance Eq ty => Eq (StreamHooks ty)
- Network.Browser: defaultGETRequest_ :: (BufferType a) => URI -> Request a
+ Network.Browser: defaultGETRequest_ :: BufferType a => URI -> Request a
- Network.Browser: request :: (HStream ty) => Request ty -> BrowserAction (HandleStream ty) (URI, Response ty)
+ Network.Browser: request :: HStream ty => Request ty -> BrowserAction (HandleStream ty) (URI, Response ty)
- Network.BufferType: bufferOps :: (BufferType bufType) => BufferOp bufType
+ Network.BufferType: bufferOps :: BufferType bufType => BufferOp bufType
- Network.HTTP: receiveHTTP :: (HStream ty) => HandleStream ty -> IO (Result (Request ty))
+ Network.HTTP: receiveHTTP :: HStream ty => HandleStream ty -> IO (Result (Request ty))
- Network.HTTP: respondHTTP :: (HStream ty) => HandleStream ty -> Response ty -> IO ()
+ Network.HTTP: respondHTTP :: HStream ty => HandleStream ty -> Response ty -> IO ()
- Network.HTTP: sendHTTP :: (HStream ty) => HandleStream ty -> Request ty -> IO (Result (Response ty))
+ Network.HTTP: sendHTTP :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- Network.HTTP: sendHTTP_notify :: (HStream ty) => HandleStream ty -> Request ty -> IO () -> IO (Result (Response ty))
+ Network.HTTP: sendHTTP_notify :: HStream ty => HandleStream ty -> Request ty -> IO () -> IO (Result (Response ty))
- Network.HTTP: simpleHTTP :: (HStream ty) => Request ty -> IO (Result (Response ty))
+ Network.HTTP: simpleHTTP :: HStream ty => Request ty -> IO (Result (Response ty))
- Network.HTTP: simpleHTTP_ :: (HStream ty) => HandleStream ty -> Request ty -> IO (Result (Response ty))
+ Network.HTTP: simpleHTTP_ :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- Network.HTTP.Base: defaultGETRequest_ :: (BufferType a) => URI -> Request a
+ Network.HTTP.Base: defaultGETRequest_ :: BufferType a => URI -> Request a
- Network.HTTP.Base: getAuth :: (Monad m) => Request ty -> m URIAuthority
+ Network.HTTP.Base: getAuth :: Monad m => Request ty -> m URIAuthority
- Network.HTTP.Base: mkRequest :: (BufferType ty) => RequestMethod -> URI -> Request ty
+ Network.HTTP.Base: mkRequest :: BufferType ty => RequestMethod -> URI -> Request ty
- Network.HTTP.HandleStream: receiveHTTP :: (HStream bufTy) => HandleStream bufTy -> IO (Result (Request bufTy))
+ Network.HTTP.HandleStream: receiveHTTP :: HStream bufTy => HandleStream bufTy -> IO (Result (Request bufTy))
- Network.HTTP.HandleStream: respondHTTP :: (HStream ty) => HandleStream ty -> Response ty -> IO ()
+ Network.HTTP.HandleStream: respondHTTP :: HStream ty => HandleStream ty -> Response ty -> IO ()
- Network.HTTP.HandleStream: sendHTTP :: (HStream ty) => HandleStream ty -> Request ty -> IO (Result (Response ty))
+ Network.HTTP.HandleStream: sendHTTP :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- Network.HTTP.HandleStream: sendHTTP_notify :: (HStream ty) => HandleStream ty -> Request ty -> IO () -> IO (Result (Response ty))
+ Network.HTTP.HandleStream: sendHTTP_notify :: HStream ty => HandleStream ty -> Request ty -> IO () -> IO (Result (Response ty))
- Network.HTTP.HandleStream: simpleHTTP :: (HStream ty) => Request ty -> IO (Result (Response ty))
+ Network.HTTP.HandleStream: simpleHTTP :: HStream ty => Request ty -> IO (Result (Response ty))
- Network.HTTP.HandleStream: simpleHTTP_ :: (HStream ty) => HandleStream ty -> Request ty -> IO (Result (Response ty))
+ Network.HTTP.HandleStream: simpleHTTP_ :: HStream ty => HandleStream ty -> Request ty -> IO (Result (Response ty))
- Network.HTTP.HandleStream: simpleHTTP_debug :: (HStream ty) => FilePath -> Request ty -> IO (Result (Response ty))
+ Network.HTTP.HandleStream: simpleHTTP_debug :: HStream ty => FilePath -> Request ty -> IO (Result (Response ty))
- Network.HTTP.Headers: findHeader :: (HasHeaders a) => HeaderName -> a -> Maybe String
+ Network.HTTP.Headers: findHeader :: HasHeaders a => HeaderName -> a -> Maybe String
- Network.HTTP.Headers: getHeaders :: (HasHeaders x) => x -> [Header]
+ Network.HTTP.Headers: getHeaders :: HasHeaders x => x -> [Header]
- Network.HTTP.Headers: insertHeader :: (HasHeaders a) => HeaderSetter a
+ Network.HTTP.Headers: insertHeader :: HasHeaders a => HeaderSetter a
- Network.HTTP.Headers: insertHeaderIfMissing :: (HasHeaders a) => HeaderSetter a
+ Network.HTTP.Headers: insertHeaderIfMissing :: HasHeaders a => HeaderSetter a
- Network.HTTP.Headers: insertHeaders :: (HasHeaders a) => [Header] -> a -> a
+ Network.HTTP.Headers: insertHeaders :: HasHeaders a => [Header] -> a -> a
- Network.HTTP.Headers: replaceHeader :: (HasHeaders a) => HeaderSetter a
+ Network.HTTP.Headers: replaceHeader :: HasHeaders a => HeaderSetter a
- Network.HTTP.Headers: retrieveHeaders :: (HasHeaders a) => HeaderName -> a -> [Header]
+ Network.HTTP.Headers: retrieveHeaders :: HasHeaders a => HeaderName -> a -> [Header]
- Network.HTTP.Headers: setHeaders :: (HasHeaders x) => x -> [Header] -> x
+ Network.HTTP.Headers: setHeaders :: HasHeaders x => x -> [Header] -> x
- Network.HTTP.Stream: receiveHTTP :: (Stream s) => s -> IO (Result Request_String)
+ Network.HTTP.Stream: receiveHTTP :: Stream s => s -> IO (Result Request_String)
- Network.HTTP.Stream: respondHTTP :: (Stream s) => s -> Response_String -> IO ()
+ Network.HTTP.Stream: respondHTTP :: Stream s => s -> Response_String -> IO ()
- Network.HTTP.Stream: sendHTTP :: (Stream s) => s -> Request_String -> IO (Result Response_String)
+ Network.HTTP.Stream: sendHTTP :: Stream s => s -> Request_String -> IO (Result Response_String)
- Network.HTTP.Stream: sendHTTP_notify :: (Stream s) => s -> Request_String -> IO () -> IO (Result Response_String)
+ Network.HTTP.Stream: sendHTTP_notify :: Stream s => s -> Request_String -> IO () -> IO (Result Response_String)
- Network.HTTP.Stream: simpleHTTP_ :: (Stream s) => s -> Request_String -> IO (Result Response_String)
+ Network.HTTP.Stream: simpleHTTP_ :: Stream s => s -> Request_String -> IO (Result Response_String)
- Network.Stream: close :: (Stream x) => x -> IO ()
+ Network.Stream: close :: Stream x => x -> IO ()
- Network.Stream: closeOnEnd :: (Stream x) => x -> Bool -> IO ()
+ Network.Stream: closeOnEnd :: Stream x => x -> Bool -> IO ()
- Network.Stream: readBlock :: (Stream x) => x -> Int -> IO (Result String)
+ Network.Stream: readBlock :: Stream x => x -> Int -> IO (Result String)
- Network.Stream: readLine :: (Stream x) => x -> IO (Result String)
+ Network.Stream: readLine :: Stream x => x -> IO (Result String)
- Network.Stream: writeBlock :: (Stream x) => x -> String -> IO (Result ())
+ Network.Stream: writeBlock :: Stream x => x -> String -> IO (Result ())
- Network.StreamDebugger: debugByteStream :: (HStream ty) => FilePath -> HandleStream ty -> IO (HandleStream ty)
+ Network.StreamDebugger: debugByteStream :: HStream ty => FilePath -> HandleStream ty -> IO (HandleStream ty)
- Network.StreamDebugger: debugStream :: (Stream a) => FilePath -> a -> IO (StreamDebugger a)
+ Network.StreamDebugger: debugStream :: Stream a => FilePath -> a -> IO (StreamDebugger a)
- Network.TCP: class (BufferType bufType) => HStream bufType
+ Network.TCP: class BufferType bufType => HStream bufType
- Network.TCP: close :: (HStream bufType) => HandleStream bufType -> IO ()
+ Network.TCP: close :: HStream bufType => HandleStream bufType -> IO ()
- Network.TCP: closeOnEnd :: (HStream bufType) => HandleStream bufType -> Bool -> IO ()
+ Network.TCP: closeOnEnd :: HStream bufType => HandleStream bufType -> Bool -> IO ()
- Network.TCP: openSocketStream :: (HStream bufType) => String -> Socket -> IO (HandleStream bufType)
+ Network.TCP: openSocketStream :: HStream bufType => String -> Socket -> IO (HandleStream bufType)
- Network.TCP: openStream :: (HStream bufType) => String -> Int -> IO (HandleStream bufType)
+ Network.TCP: openStream :: HStream bufType => String -> Int -> IO (HandleStream bufType)
- Network.TCP: openTCPConnection :: (BufferType ty) => String -> Int -> IO (HandleStream ty)
+ Network.TCP: openTCPConnection :: BufferType ty => String -> Int -> IO (HandleStream ty)
- Network.TCP: readBlock :: (HStream bufType) => HandleStream bufType -> Int -> IO (Result bufType)
+ Network.TCP: readBlock :: HStream bufType => HandleStream bufType -> Int -> IO (Result bufType)
- Network.TCP: readLine :: (HStream bufType) => HandleStream bufType -> IO (Result bufType)
+ Network.TCP: readLine :: HStream bufType => HandleStream bufType -> IO (Result bufType)
- Network.TCP: socketConnection :: (BufferType ty) => String -> Socket -> IO (HandleStream ty)
+ Network.TCP: socketConnection :: BufferType ty => String -> Socket -> IO (HandleStream ty)
- Network.TCP: writeBlock :: (HStream bufType) => HandleStream bufType -> bufType -> IO (Result ())
+ Network.TCP: writeBlock :: HStream bufType => HandleStream bufType -> bufType -> IO (Result ())

Files

HTTP.cabal view
@@ -1,5 +1,5 @@ Name: HTTP-Version: 4000.0.9+Version: 4000.0.10 Cabal-Version: >= 1.2 Build-type: Simple License: BSD3@@ -80,7 +80,7 @@                  Network.HTTP.MD5Aux,                  Network.HTTP.Utils   GHC-options: -fwarn-missing-signatures -Wall-  Build-depends: base >= 2 && < 4, network, parsec, mtl+  Build-depends: base >= 2 && < 4.4, network, parsec, mtl   if flag(old-base)     Build-depends: base < 3   else
Network/Stream.hs view
@@ -29,6 +29,7 @@     , failParse -- :: String -> Result a    , failWith  -- :: ConnError -> Result a+   , failMisc  -- :: String -> Result a    ) where  import Control.Monad.Error@@ -43,6 +44,12 @@ instance Error ConnError where   noMsg = strMsg "unknown error"   strMsg x = ErrorMisc x++-- in GHC 7.0 the Monad instance for Error no longer+-- uses fail x = Left (strMsg x). failMisc is therefore+-- used instead.+failMisc :: String -> Result a+failMisc x = failWith (strMsg x)  failParse :: String -> Result a failParse x = failWith (ErrorParse x)
Network/TCP.hs view
@@ -47,6 +47,7 @@    ( ConnError(..)    , Result    , failWith+   , failMisc    ) import Network.BufferType @@ -350,12 +351,12 @@ 			then do 			  when (connCloseEOF conn) $ catch (close ref) (\ _ -> return ()) 			  return (return (buf_empty (connBuffer conn)))-			else return (fail (show e)))+			else return (failMisc (show e)))  bufferPutBlock :: BufferOp a -> Handle -> a -> IO (Result ()) bufferPutBlock ops h b =    Prelude.catch (buf_hPut ops h b >> hFlush h >> return (return ()))-                (\ e -> return (fail (show e)))+                (\ e -> return (failMisc (show e)))  bufferReadLine :: HStream a => HandleStream a -> IO (Result a) bufferReadLine ref = onNonClosedDo ref $ \ conn -> do@@ -373,7 +374,7 @@                   then do 	  	    when (connCloseEOF conn) $ catch (close ref) (\ _ -> return ()) 		    return (return   (buf_empty (connBuffer conn)))-                  else return (fail (show e)))+                  else return (failMisc (show e)))  where    -- yes, this s**ks.. _may_ have to be addressed if perf    -- suggests worthiness.