withConnection change in example
commit20023fecd4f3489ac41d91c276bc3e3067614134
authorEitan Chatav <eitan.chatav@gmail.com>
dateTue 13 Mar 2018, 22:46 (9 years ago)
parente18b7fb
squeal-postgresql/exe/Example.hs+2−6
@@ -121,12 +121,8 @@ main = do
121121 finish connection3
122122
123123main2 :: IO ()
124−main2 = void $
125− withConnection "host=localhost port=5432 dbname=exampledb" . goPQ $
124+main2 =
125+ void . withConnection "host=localhost port=5432 dbname=exampledb" $
126126 define setup
127127 & pqThen session
128128 & thenDefine teardown
129− where
130− goPQ pq conn = do
131− SOP.K x <- runPQ pq conn
132− return (x, SOP.K (SOP.unK conn))