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:
parent
dd3e982c9e
commit
2ccab779f9
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,9 @@ query c col skip ret sel fsel = do
|
||||||
putI32 skip
|
putI32 skip
|
||||||
putI32 ret
|
putI32 ret
|
||||||
put sel
|
put sel
|
||||||
put fsel
|
case fsel of
|
||||||
|
Nothing -> putNothing
|
||||||
|
Just fsel -> put fsel
|
||||||
(reqID, msg) <- packMsg c OP_QUERY body
|
(reqID, msg) <- packMsg c OP_QUERY body
|
||||||
L.hPut (cHandle c) msg
|
L.hPut (cHandle c) msg
|
||||||
return reqID
|
return reqID
|
||||||
|
|
Loading…
Reference in a new issue