warc-1.0.4: A parser for the Web Archive (WARC) format

Safe HaskellNone
LanguageHaskell2010

Data.Warc.Header

Contents

Synopsis

Parsing

Encoding

WARC Version

data Version Source #

Constructors

Version 
Instances
Eq Version Source # 
Instance details

Defined in Data.Warc.Header

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Ord Version Source # 
Instance details

Defined in Data.Warc.Header

Read Version Source # 
Instance details

Defined in Data.Warc.Header

Show Version Source # 
Instance details

Defined in Data.Warc.Header

Types

newtype RecordId Source #

Constructors

RecordId Uri 

data Digest Source #

Constructors

Digest 
Instances
Eq Digest Source # 
Instance details

Defined in Data.Warc.Header

Methods

(==) :: Digest -> Digest -> Bool #

(/=) :: Digest -> Digest -> Bool #

Ord Digest Source # 
Instance details

Defined in Data.Warc.Header

Read Digest Source # 
Instance details

Defined in Data.Warc.Header

Show Digest Source # 
Instance details

Defined in Data.Warc.Header

newtype Uri Source #

Constructors

Uri ByteString 
Instances
Eq Uri Source # 
Instance details

Defined in Data.Warc.Header

Methods

(==) :: Uri -> Uri -> Bool #

(/=) :: Uri -> Uri -> Bool #

Ord Uri Source # 
Instance details

Defined in Data.Warc.Header

Methods

compare :: Uri -> Uri -> Ordering #

(<) :: Uri -> Uri -> Bool #

(<=) :: Uri -> Uri -> Bool #

(>) :: Uri -> Uri -> Bool #

(>=) :: Uri -> Uri -> Bool #

max :: Uri -> Uri -> Uri #

min :: Uri -> Uri -> Uri #

Read Uri Source # 
Instance details

Defined in Data.Warc.Header

Show Uri Source # 
Instance details

Defined in Data.Warc.Header

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

Header field types

data Field a Source #

Constructors

Field 

Fields

field :: Field a -> Traversal' RecordHeader a Source #

A lens-y means of querying Fields.

lookupField :: RecordHeader -> Field a -> Maybe (Either String a) Source #

Lookup the value of a field. Returns Nothing if the field is not present, Just (Left err) in the event of a parse error, and Just (Right v) on success.

mapField :: (a -> b) -> (b -> a) -> Field a -> Field b Source #

Standard fields

Lenses