packages feed

bson 0.0.4 → 0.1

raw patch · 2 files changed

+13/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Bson: instance [incoherent] Val ()
+ Data.Bson: instance [incoherent] Val (Maybe Value)
+ Data.Bson: instance [incoherent] Val a => Val (Maybe a)

Files

Data/Bson.hs view
@@ -148,7 +148,7 @@ 	ObjId x -> f x 	Bool x -> f x 	UTC x -> f x-	Null -> f ()+	Null -> f (Nothing :: Maybe Value) 	RegEx x -> f x 	JavaScr x -> f x 	Sym x -> f x@@ -265,10 +265,17 @@ 	cast' (UTC x) = Just (utcTimeToPOSIXSeconds x) 	cast' _ = Nothing -instance Val () where-	val () = Null-	cast' Null = Just ()-	cast' _ = Nothing+instance Val (Maybe Value) where+	val Nothing = Null+	val (Just v) = v+	cast' Null = Just Nothing+	cast' v = Just (Just v)++instance (Val a) => Val (Maybe a) where+	val Nothing = Null+	val (Just a) = val a+	cast' Null = Just Nothing+	cast' v = fmap Just (cast' v)  instance Val Regex where 	val = RegEx
bson.cabal view
@@ -1,5 +1,5 @@ Name: bson-Version: 0.0.4+Version: 0.1 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). 	.