bson 0.1.3 → 0.1.4
raw patch · 4 files changed
+8/−5 lines, 4 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.Bson: (:=) :: Label -> Value -> Field
+ Data.Bson: (:=) :: !Label -> Value -> Field
- Data.Bson: label :: Field -> Label
+ Data.Bson: label :: Field -> !Label
Files
- Data/Bson.hs +3/−2
- Data/Bson/Binary.hs +1/−1
- Data/UString.hs +2/−1
- bson.cabal +2/−1
Data/Bson.hs view
@@ -2,7 +2,7 @@ Use the GHC language extension /OverloadedStrings/ to automatically convert String literals to UString (UTF8) -} -{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable, RankNTypes, OverlappingInstances, IncoherentInstances, ScopedTypeVariables, ForeignFunctionInterface #-}+{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable, RankNTypes, OverlappingInstances, IncoherentInstances, ScopedTypeVariables, ForeignFunctionInterface, BangPatterns #-} module Data.Bson ( -- * UTF-8 String@@ -95,7 +95,7 @@ infix 0 :=, =:, =? -data Field = (:=) {label :: Label, value :: Value} deriving (Typeable, Eq)+data Field = (:=) {label :: !Label, value :: Value} deriving (Typeable, Eq) -- ^ A BSON field is a named value, where the name (label) is a string and the value is a BSON 'Value' (=:) :: (Val v) => Label -> v -> Field@@ -363,6 +363,7 @@ -- ** Regex data Regex = Regex UString UString deriving (Typeable, Show, Read, Eq)+-- ^ The first string is the regex pattern, the second is the regex options string. Options are identified by characters, which must be listed in alphabetical order. Valid options are *i* for case insensitive matching, *m* for multiline matching, *x* for verbose mode, *l* to make \\w, \\W, etc. locale dependent, *s* for dotall mode (\".\" matches everything), and *u* to make \\w, \\W, etc. match unicode. -- ** Javascript
Data/Bson/Binary.hs view
@@ -147,7 +147,7 @@ putArray :: [Value] -> Put putArray vs = putDocument (zipWith f [0..] vs)- where f i v = U.pack (show i) := v+ where f i v = (U.pack $! show i) := v getArray :: Get [Value] getArray = map value <$> getDocument
Data/UString.hs view
@@ -1,6 +1,7 @@ -- | UTF-8 String -{-# LANGUAGE TypeSynonymInstances, StandaloneDeriving, DeriveDataTypeable #-}+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}+{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} module Data.UString ( UString, u,
bson.cabal view
@@ -1,5 +1,5 @@ Name: bson-Version: 0.1.3+Version: 0.1.4 Synopsis: BSON documents are JSON-like objects with a standard binary encoding Description: A BSON Document is an untyped (dynamically type-checked) record. I.e. it is a list of name-value pairs, where a Value is a single sum type with constructors for basic types (Bool, Int, Float, String, and Time), compound types (List, and (embedded) Document), and special types (Binary, Javascript, ObjectId, RegEx, and a few others). .@@ -13,3 +13,4 @@ Build-Depends: base < 5, time, bytestring, network, cryptohash, binary, data-binary-ieee754, compact-string-fix, mtl >= 2 Build-Type: Simple Exposed-modules: Data.UString, Data.Bson, Data.Bson.Binary+ghc-prof-options: -auto-all