ua-parser 0.7.6.0 → 0.7.7.0
raw patch · 4 files changed
+19/−10 lines, 4 filesdep +cerealdep +cereal-textPVP ok
version bump matches the API change (PVP)
Dependencies added: cereal, cereal-text
API changes (from Hackage documentation)
+ Web.UAParser: instance Control.DeepSeq.NFData Web.UAParser.DevResult
+ Web.UAParser: instance Control.DeepSeq.NFData Web.UAParser.OSResult
+ Web.UAParser: instance Control.DeepSeq.NFData Web.UAParser.UAResult
+ Web.UAParser: instance Data.Serialize.Serialize Web.UAParser.DevResult
+ Web.UAParser: instance Data.Serialize.Serialize Web.UAParser.OSResult
+ Web.UAParser: instance Data.Serialize.Serialize Web.UAParser.UAResult
Files
- bench/Main.hs +0/−6
- changelog.md +3/−0
- src/Web/UAParser.hs +7/−3
- ua-parser.cabal +9/−1
bench/Main.hs view
@@ -7,7 +7,6 @@ ------------------------------------------------------------------------------- import Control.Applicative as A-import Control.DeepSeq import Criterion.Main ------------------------------------------------------------------------------- import Web.UAParser@@ -24,8 +23,3 @@ , bench "Parsing 100 OSes" $ nf (map (parseOS . ostcString)) oses , bench "Parsing 100 Devices" $ nf (map (parseDev . dtcString)) devs ]---instance NFData UAResult-instance NFData OSResult-instance NFData DevResult
changelog.md view
@@ -1,3 +1,6 @@+0.7.7.0+* [Add NFData and Serialize instances](https://github.com/ua-parser/uap-haskell/pull/16)+ 0.7.6.0 * Newer GHC support * Update regexes
src/Web/UAParser.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoMonomorphismRestriction #-}@@ -26,6 +27,7 @@ ------------------------------------------------------------------------------- import Control.Applicative+import Control.DeepSeq import Control.Monad import Data.Aeson import Data.ByteString.Char8 (ByteString)@@ -40,6 +42,8 @@ import Data.Yaml import GHC.Generics import Text.Regex.PCRE.Light+import Data.Serialize+import Data.Serialize.Text () ------------------------------------------------------------------------------- @@ -94,7 +98,7 @@ , uarV1 :: Maybe Text , uarV2 :: Maybe Text , uarV3 :: Maybe Text- } deriving (Show, Read, Eq, Typeable, Data, Generic)+ } deriving (Show, Read, Eq, Typeable, Data, Generic, NFData, Serialize) -------------------------------------------------------------------------------@@ -152,7 +156,7 @@ , osrV2 :: Maybe Text , osrV3 :: Maybe Text , osrV4 :: Maybe Text- } deriving (Show,Read,Eq,Typeable,Data,Generic)+ } deriving (Show,Read,Eq,Typeable,Data,Generic,NFData,Serialize) instance Default OSResult where def = OSResult "Other" Nothing Nothing Nothing Nothing@@ -234,7 +238,7 @@ drFamily :: Text , drBrand :: Maybe Text , drModel :: Maybe Text- } deriving (Show,Read,Eq,Typeable,Data,Generic)+ } deriving (Show,Read,Eq,Typeable,Data,Generic,NFData,Serialize) instance Default DevResult where
ua-parser.cabal view
@@ -1,6 +1,6 @@ name: ua-parser description: Please refer to the git/github README on the project for example usage.-version: 0.7.6.0+version: 0.7.7.0 synopsis: A library for parsing User-Agent strings, official Haskell port of ua-parser license: BSD3 license-file: LICENSE@@ -44,6 +44,9 @@ , aeson >= 0.7 , data-default , file-embed < 0.1+ , deepseq+ , cereal+ , cereal-text if flag(lib-Werror) ghc-options: -Werror@@ -77,6 +80,9 @@ , data-default , filepath , file-embed+ , deepseq+ , cereal+ , cereal-text benchmark bench type: exitcode-stdio-1.0@@ -99,6 +105,8 @@ , pcre-light , file-embed , data-default+ , cereal+ , cereal-text if flag(lib-Werror) ghc-options: -Werror