ua-parser-0.7: A library for parsing User-Agent strings, official Haskell port of ua-parser

Safe HaskellNone
LanguageHaskell2010

Web.UAParser

Contents

Synopsis

Parsing browser (user agent)

parseUA :: ByteString -> Maybe UAResult Source

Parse a given User-Agent string

parseUALenient :: ByteString -> UAResult Source

Parser that, upon failure to match a pattern returns a result of family Other with all other fields blank. This is mainly for compatibility with the uap-core test suite

uarVersion :: UAResult -> Text Source

Construct a browser version-string from UAResult

Parsing OS

parseOS :: ByteString -> Maybe OSResult Source

Parse OS from given User-Agent string

parseOSLenient :: ByteString -> OSResult Source

Parser that, upon failure to match a pattern returns a result of family Other with all other fields blank. This is mainly for compatibility with the uap-core test suite

osrVersion :: OSResult -> Text Source

Construct a version string from OSResult

Parsing Dev

parseDevLenient :: ByteString -> DevResult Source

Parser that, upon failure to match a pattern returns a result of family Other with all other fields blank. This is mainly for compatibility with the uap-core test suite