import Database.HDBC
import Database.HDBC.Sqlite3
main :: IO ()
main = do
c <- connectSqlite3 "some.db"
r <- quickQuery c "select 1;" []
disconnect c
print r
Expected result
Raise an error to tell the connection is already closed,
similarly to putStrLn =<< (withFile "file" ReadMode $ hGetContents).
Actual result
Only an empty list [] is printed without any error.
This can make it very hard to detect I used lazy IO in a wrong way.
Minimum code to reproduce
Expected result
Raise an error to tell the connection is already closed, similarly to
putStrLn =<< (withFile "file" ReadMode $ hGetContents)
.Actual result
Only an empty list
[]
is printed without any error. This can make it very hard to detect I used lazy IO in a wrong way.My environment