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
This commit is contained in:
Scott R. Parish 2010-01-12 20:07:34 -06:00
parent dd3e982c9e
commit 2ccab779f9

View file

@ -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