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

Safe HaskellNone
LanguageHaskell2010

Data.Warc.Header

Contents

Synopsis

Parsing

Encoding

WARC Version

Types

newtype Uri Source #

Constructors

Uri ByteString 

Instances

Eq Uri Source # 

Methods

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

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

Ord Uri Source # 

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 # 
Show Uri Source # 

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