packages feed

hasql 0.20 → 0.20.0.1

raw patch · 5 files changed

+15/−10 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hasql.cabal view
@@ -1,7 +1,7 @@ name:   hasql version:-  0.20+  0.20.0.1 category:   Hasql, Database, PostgreSQL synopsis:
library/Hasql/Core/Batch.hs view
@@ -22,16 +22,16 @@     Batch (\_ psr -> (pure x, psr))   {-# INLINABLE (<*>) #-}   (<*>) (Batch left) (Batch right) =-    Batch (\idt psr -> case left idt psr of+    Batch (\(!idt) (!psr) -> case left idt psr of       (leftRequest, leftPsr) -> case right idt leftPsr of         (rightRequest, rightPsr) -> (leftRequest <*> rightRequest, rightPsr))  statement :: A.Statement params result -> params -> Batch result statement (A.Statement template paramOIDs paramBytesBuilder1 paramBytesBuilder2 interpretResponses1 interpretResponses2 prepared) params =-  Batch $ \idt psr ->+  Batch $ \(!idt) (!psr) ->   if prepared     then case D.lookupOrRegister template paramOIDs psr of-      (newOrOldName, newPsr) ->+      (!newOrOldName, !newPsr) ->         let           request =             case newOrOldName of
library/Hasql/Core/ParseDataRow.hs view
@@ -25,13 +25,13 @@  nullableColumn :: D.BinaryParser column -> ParseDataRow (Maybe column) nullableColumn parser =-  ParseDataRow 1 $ \vec index ->+  ParseDataRow 1 $ \vec !index ->   either (Left . mappend ("Column " <> (fromString . show) index <> ": ")) Right $   traverse (D.run parser) (A.unsafeIndex vec index)  column :: D.BinaryParser column -> ParseDataRow column column parser =-  ParseDataRow 1 $ \vec index ->+  ParseDataRow 1 $ \vec !index ->   either (Left . mappend ("Column " <> (fromString . show) index <> ": ")) Right $   case A.unsafeIndex vec index of     Just bytes -> D.run parser bytes
profiling/Main.hs view
@@ -17,7 +17,12 @@   do     connection <- connect     traceEventIO "START Session"-    Right !result <- fmap force <$> A.session connection (session 10 10 100)+    Right !result <- fmap force <$> A.session connection (session 50 10 100)+    Right !result <- fmap force <$> A.session connection (session 50 10 100)+    Right !result <- fmap force <$> A.session connection (session 10 50 100)+    Right !result <- fmap force <$> A.session connection (session 50 10 100)+    Right !result <- fmap force <$> A.session connection (session 10 50 100)+    Right !result <- fmap force <$> A.session connection (session 10 50 100)     traceEventIO "STOP Session"     return () 
tests/Main.hs view
@@ -23,13 +23,13 @@ connect :: IO A.Connection connect =   do-    openingResult <- A.open (A.TCPConnectionSettings "localhost" 5432) "postgres" "" Nothing handleErrorOrNotification+    openingResult <- A.open (A.TCPConnectionSettings "localhost" 5432) "postgres" "" Nothing handleNotification     case openingResult of       Left error -> fail (showString "Can't connect: " (show error))       Right connection -> return connection   where-    handleErrorOrNotification x =-      putStrLn ("Async event: " <> show x)+    handleNotification x =+      putStrLn ("Notification: " <> show x)  runTests :: A.Connection -> IO () runTests connection =