From 2ccab779f9fb15e98077938376aab42b5e331bed Mon Sep 17 00:00:00 2001 From: "Scott R. Parish" Date: Tue, 12 Jan 2010 20:07:34 -0600 Subject: [PATCH] Binary.Put didn't treat Maybe the way i thought I thought maybe it would unwrap Just x and put x, or not put anything if Nothing, but aparently it puts \NUL if Nothing --- Database/MongoDB.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Database/MongoDB.hs b/Database/MongoDB.hs index edd2ee7..48491ba 100644 --- a/Database/MongoDB.hs +++ b/Database/MongoDB.hs @@ -121,7 +121,9 @@ query c col skip ret sel fsel = do putI32 skip putI32 ret put sel - put fsel + case fsel of + Nothing -> putNothing + Just fsel -> put fsel (reqID, msg) <- packMsg c OP_QUERY body L.hPut (cHandle c) msg return reqID