api-tools 0.5.1 → 0.5.2
raw patch · 4 files changed
+9/−4 lines, 4 filesdep ~textPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: text
API changes (from Hackage documentation)
+ Data.API.Types: instance NFData Binary
Files
- api-tools.cabal +2/−2
- changelog +4/−0
- src/Data/API/Tools/DeepSeq.hs +1/−1
- src/Data/API/Types.hs +2/−1
api-tools.cabal view
@@ -1,5 +1,5 @@ Name: api-tools-Version: 0.5.1+Version: 0.5.2 Synopsis: DSL for generating API boilerplate and docs Description: api-tools provides a compact DSL for describing an API. It uses Template Haskell to generate the@@ -25,7 +25,7 @@ Source-Repository this Type: git Location: git://github.com/iconnect/api-tools.git- Tag: 0.5.1+ Tag: 0.5.2 Library Hs-Source-Dirs: src
changelog view
@@ -1,5 +1,9 @@ -*-change-log-*- +0.5.2 Adam Gundry <adam@well-typed.com> December 2014+ * Fix bug in DeepSeq tool: records not reduced to normal form+ * Add instance for NFData Binary+ 0.5.1 Adam Gundry <adam@well-typed.com> November 2014 * Tool to generate NFData instances (added dependency on deepseq) * Expose internal module with TH utility functions
src/Data/API/Tools/DeepSeq.hs view
@@ -32,7 +32,7 @@ where bdy an sr x = lamE [varP x] $ foldr f [e|()|] (srFields sr) where- f (fn,_) r = [e| $(nodeFieldE an fn) $(varE x) `seq` $r |]+ f (fn,_) r = [e| rnf ($(nodeFieldE an fn) $(varE x)) `seq` $r |] gen_su :: Tool (APINode, SpecUnion) gen_su = mkTool $ \ ts (an, su) -> do
src/Data/API/Types.hs view
@@ -36,6 +36,7 @@ import Data.API.Utils +import Control.DeepSeq import qualified Data.CaseInsensitive as CI import Data.String import Data.Time@@ -284,7 +285,7 @@ -- | Binary data is represented in JSON format as a base64-encoded -- string newtype Binary = Binary { _Binary :: B.ByteString }- deriving (Show,Eq,Ord)+ deriving (Show,Eq,Ord,NFData) instance ToJSON Binary where toJSON = String . T.decodeLatin1 . B64.encode . _Binary