@@ -241,6 +241,16 @@ instance FromField Bool where
241 | bs == Just "f" = pure False
241 | bs == Just "f" = pure False
242 | otherwise = returnError ConversionFailed f ""
242 | otherwise = returnError ConversionFailed f ""
244+instance FromField Char where
246+ if typeOid f /= typoid (TypeInfo.char)
247+ then returnError Incompatible f ""
249+ Nothing -> returnError UnexpectedNull f ""
250+ Just bs -> if B.length bs /= 1
251+ then returnError ConversionFailed f "length not 1"
252+ else return $! (B.head bs)
244instance FromField Int16 where
254instance FromField Int16 where
245 fromField = atto ok16 $ signed decimal
255 fromField = atto ok16 $ signed decimal