on dev help sign in
devoid
commit65dca81d2105d138c3bf5f265cc44e242a9175fc authorEitan Chatav <eitan@Eitans-MacBook-Pro.local> dateFri 17 May 2019, 16:19 (7 years ago) parent2645387
4 files changed+7−9
squeal-postgresql/exe/Example.hs+1−2 squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+3−3 squeal-postgresql/src/Squeal/PostgreSQL/PG.hs+1−1 squeal-postgresql/test/Specs/ExceptionHandling.hs+2−3
squeal-postgresql/exe/Example.hs+1−2
@@ -11,7 +11,6 @@
1111
1212module Main (main, main2) where
1313
14−import Control.Monad (void)
1514import Control.Monad.IO.Class (MonadIO (..))
1615import Data.Int (Int16, Int32)
1716import Data.Monoid ((<>))
@@ -117,7 +116,7 @@ main = do
117116
118117main2 :: IO ()
119118main2 =
120− void . withConnection "host=localhost port=5432 dbname=exampledb" $
119+ withConnection "host=localhost port=5432 dbname=exampledb" $
121120 define setup
122121 & pqThen session
123122 & pqThen (define teardown)
squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+3−3
@@ -39,7 +39,7 @@ the input and output should be equal.
3939
4040>>> let input = Row 2 "hi" (Just True)
4141>>> :{
42−void . withConnection "host=localhost port=5432 dbname=exampledb" $ do
42+withConnection "host=localhost port=5432 dbname=exampledb" $ do
4343 result <- runQueryParams roundTrip input
4444 Just output <- firstRow result
4545 liftIO . print $ input == output
@@ -78,7 +78,7 @@ let
7878>>> :set -XOverloadedLists
7979>>> let input = Row (VarArray [1,2]) (FixArray (Just 1,Nothing)) (FixArray ((1,2),(3,4),(5,6)))
8080>>> :{
81−void . withConnection "host=localhost port=5432 dbname=exampledb" $ do
81+withConnection "host=localhost port=5432 dbname=exampledb" $ do
8282 result <- runQueryParams roundTrip input
8383 Just output <- firstRow result
8484 liftIO . print $ input == output
@@ -170,7 +170,7 @@ let
170170 Just output <- firstRow result
171171 liftIO . print $ input == output
172172in
173− void . withConnection "host=localhost port=5432 dbname=exampledb" $
173+ withConnection "host=localhost port=5432 dbname=exampledb" $
174174 define setup
175175 & pqThen session
176176 & pqThen (define teardown)
squeal-postgresql/src/Squeal/PostgreSQL/PG.hs+1−1
@@ -320,7 +320,7 @@ let
320320>>> let input = Only (Money 20020)
321321
322322>>> :{
323−void . withConnection "host=localhost port=5432 dbname=exampledb" $ do
323+withConnection "host=localhost port=5432 dbname=exampledb" $ do
324324 result <- runQueryParams roundTrip input
325325 Just output <- firstRow result
326326 liftIO . print $ input == output
squeal-postgresql/test/Specs/ExceptionHandling.hs+2−3
@@ -24,7 +24,6 @@ import Data.Vector (Vector)
2424import qualified Generics.SOP as SOP
2525import qualified GHC.Generics as GHC
2626import Squeal.PostgreSQL
27−import Squeal.PostgreSQL.Migration
2827import Test.Hspec
2928
3029type Schema =
@@ -88,12 +87,12 @@ migration = Migration { name = "test"
8887 , down = teardown }
8988
9089setupDB :: IO ()
91−setupDB = void . withConnection connectionString $
90+setupDB = withConnection connectionString $
9291 manipulate (UnsafeManipulation "SET client_min_messages TO WARNING;")
9392 & pqThen (migrateUp (single migration))
9493
9594dropDB :: IO ()
96−dropDB = void . withConnection connectionString $
95+dropDB = withConnection connectionString $
9796 manipulate (UnsafeManipulation "SET client_min_messages TO WARNING;")
9897 & pqThen (migrateDown (single migration))
9998