Safe Haskell | None |
---|---|
Language | Haskell2010 |
Web.UAParser
- parseUA :: ByteString -> Maybe UAResult
- parseUALenient :: ByteString -> UAResult
- data UAResult = UAResult {}
- uarVersion :: UAResult -> Text
- parseOS :: ByteString -> Maybe OSResult
- parseOSLenient :: ByteString -> OSResult
- data OSResult = OSResult {}
- osrVersion :: OSResult -> Text
- parseDev :: ByteString -> Maybe DevResult
- parseDevLenient :: ByteString -> DevResult
- data DevResult = DevResult {}
Parsing browser (user agent)
parseUA :: ByteString -> Maybe UAResult #
Parse a given User-Agent string
parseUALenient :: ByteString -> UAResult #
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
Results datatype for the parsed User-Agent
Constructors
UAResult | |
uarVersion :: UAResult -> Text #
Construct a browser version-string from UAResult
Parsing OS
parseOS :: ByteString -> Maybe OSResult #
Parse OS from given User-Agent string
parseOSLenient :: ByteString -> OSResult #
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 #
Construct a version string from OSResult
Parsing Dev
parseDev :: ByteString -> Maybe DevResult #
parseDevLenient :: ByteString -> DevResult #
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