uri-conduit 1.1.0 → 1.1.1
raw patch · 2 files changed
+10/−1 lines, 2 filesdep +deepseq
Dependencies added: deepseq
Files
- Network/URI/Conduit.hs +8/−0
- uri-conduit.cabal +2/−1
Network/URI/Conduit.hs view
@@ -39,6 +39,7 @@ import Control.Exception (Exception) import Data.Typeable (Typeable) import Control.Monad.Trans.Class (lift)+import Control.DeepSeq (NFData(rnf)) data URI = URI { uriScheme :: Text@@ -49,12 +50,19 @@ } deriving (Show, Eq, Ord) +instance NFData URI where+ rnf (URI a b c d e) = rnf a `seq` rnf b `seq` rnf c `seq`+ rnf d `seq` rnf e `seq` ()+ data URIAuth = URIAuth { uriUserInfo :: Text , uriRegName :: Text , uriPort :: Text } deriving (Show, Eq, Ord)++instance NFData URIAuth where+ rnf (URIAuth a b c) = rnf a `seq` rnf b `seq` rnf c `seq` () parseURI :: Failure URIException m => Text -> m URI parseURI t = maybe (failure $ InvalidURI t) (return . fromNetworkURI) $ N.parseURI $ unpack t
uri-conduit.cabal view
@@ -1,5 +1,5 @@ Name: uri-conduit-Version: 1.1.0+Version: 1.1.1 Synopsis: Read and write URIs Homepage: http://github.com/snoyberg/xml License: BSD3@@ -25,3 +25,4 @@ , monad-control >= 0.3 && < 0.4 , system-filepath >= 0.4.3 && < 0.5 , system-fileio >= 0.3.3 && < 0.4+ , deepseq >= 1.1.0.0