packages feed

warc 1.0.3 → 1.0.4

raw patch · 2 files changed

+39/−6 lines, 2 filesdep ~attoparsecdep ~basedep ~freePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: attoparsec, base, free, hashable, lens, optparse-applicative, time

API changes (from Hackage documentation)

- Data.Warc.Header: Field :: FieldName -> (a -> Builder) -> Parser a -> Field a
+ Data.Warc.Header: Field :: FieldName -> a -> Builder -> Parser a -> Field a

Files

src/Data/Warc.hs view
@@ -10,6 +10,38 @@ -- This module provides a streaming parser and encoder for WARC archives for use -- with the @pipes@ package. --+-- Here is a simple example which walks throught the WARC file:+--+-- > {-# LANGUAGE RecordWildCards #-}+-- > {-# LANGUAGE OverloadedStrings #-}+-- > +-- > module Main where+-- > +-- > import Control.Lens+-- > import Control.Monad.IO.Class+-- > import qualified Data.ByteString as B+-- > import Data.Warc+-- > import qualified Pipes as P+-- > import Pipes.ByteString (fromHandle)+-- > import System.IO+-- > +-- > iterFunc :: Record IO b -> IO b+-- > iterFunc Record {..} = do+-- >   case recHeader ^. recHeaders . at "Content-Type" of+-- >     Just ct -> liftIO $ putStrLn ("Content-Type: " ++ show ct)+-- >     Nothing -> return ()+-- >   r <-+-- >     liftIO $ P.runEffect $ P.for recContent $ \x -> do+-- >       liftIO $ putStrLn ("Got bytes: " ++ show (B.length x))+-- >       return ()+-- >   return r+-- > +-- > main :: IO ()+-- > main = do+-- >   withFile "example.warc" ReadMode $ \h -> do+-- >     _ <- iterRecords iterFunc (parseWarc (fromHandle h))+-- >     return ()+-- module Data.Warc     ( Warc(..)     , Record(..)
warc.cabal view
@@ -1,5 +1,5 @@ name:                warc-version:             1.0.3+version:             1.0.4 synopsis:            A parser for the Web Archive (WARC) format description:         A streaming parser for the Web Archive (WARC) format. homepage:            http://github.com/bgamari/warc@@ -10,6 +10,7 @@ copyright:           (c) 2015 Ben Gamari category:            Data build-type:          Simple+tested-with:         GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.1 cabal-version:       >=1.10  source-repository head@@ -20,19 +21,19 @@   exposed-modules:     Data.Warc, Data.Warc.Header   other-extensions:    RankNTypes, OverloadedStrings, TemplateHaskell   hs-source-dirs:      src-  build-depends:       base >=4.8 && <4.11,-                       pipes >=4.1 && <4.3,+  build-depends:       base >=4.8 && <4.12,+                       pipes >=4.1 && <4.4,                        attoparsec >=0.12 && <0.14,                        unordered-containers >=0.2 && <0.3,                        hashable >=1.2 && <1.3,                        bytestring >=0.10 && <0.11,                        pipes-bytestring >=2.1 && <2.2,                        transformers >=0.4 && <0.6,-                       lens >=4.7 && <4.16,+                       lens >=4.7 && <4.18,                        pipes-attoparsec >=0.5 && <0.6,-                       free >=4.10 && <4.13,+                       free >=4.10 && <5.2,                        errors >=1.4 && <3.0,-                       time >=1.5 && <1.7,+                       time >=1.5 && <1.10,                        text >=1.2 && <1.3,                        mmorph >= 1.0 && <1.2   default-language:    Haskell2010