on dev help sign in
withConnection change in example
20023feEitan Chatav
squeal-postgresql/exe/Example.hs+2−6
@@ -121,12 +121,8 @@ main = do
121 finish connection3
121 finish connection3
122
122
123main2 :: IO ()
123main2 :: IO ()
124−main2 = void $
124+main2 =
125− withConnection "host=localhost port=5432 dbname=exampledb" . goPQ $
125+ void . withConnection "host=localhost port=5432 dbname=exampledb" $
126 define setup
126 define setup
127 & pqThen session
127 & pqThen session
128 & thenDefine teardown
128 & thenDefine teardown
129− where
130− goPQ pq conn = do
131− SOP.K x <- runPQ pq conn
132− return (x, SOP.K (SOP.unK conn))