Skip to content

Commit 537bf9d

Browse files
committed
Merge pull request epost#12 from anttih/update-deps
Update deps, fix warnings
2 parents eb1febd + b3a8a02 commit 537bf9d

File tree

4 files changed

+21
-25
lines changed

4 files changed

+21
-25
lines changed

bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
"dependencies": {
2929
"purescript-arrays": "~0.4.0",
3030
"purescript-either": "~0.2.0",
31-
"purescript-foreign": "~0.5.0",
31+
"purescript-foreign": "~0.7.0",
3232
"purescript-foldable-traversable": "~0.4.0",
33-
"purescript-transformers": "~0.6.0",
34-
"purescript-aff": "~0.11.0",
33+
"purescript-transformers": "~0.8.0",
34+
"purescript-aff": "~0.16.0",
3535
"purescript-integers": "~0.2.0"
3636
}
3737
}

src/Database/Postgres.purs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,20 @@ module Database.Postgres
1717
) where
1818

1919
import Prelude
20-
import Control.Alt
21-
import Control.Apply ((*>))
22-
import Control.Monad.Eff
23-
import Control.Monad.Trans
24-
import Data.Either
20+
import Control.Monad.Eff (Eff)
21+
import Data.Either (either)
2522
import Data.Function (Fn2(), runFn2)
26-
import Data.Array
27-
import Data.Foreign
28-
import Data.Foreign.Class
29-
import Data.Maybe
30-
import Control.Monad.Aff
31-
import Control.Monad.Eff.Class
32-
import Control.Monad.Eff.Exception(Error(), error)
33-
import Control.Monad.Error.Class (throwError, catchError)
23+
import Data.Array ((!!))
24+
import Data.Foreign (Foreign, ForeignError)
25+
import Data.Foreign.Class (class IsForeign, read)
26+
import Data.Maybe (Maybe(Just, Nothing), maybe)
27+
import Control.Monad.Aff (Aff, finally)
28+
import Control.Monad.Eff.Class (liftEff)
29+
import Control.Monad.Eff.Exception (error)
30+
import Control.Monad.Error.Class (throwError)
3431
import Data.Traversable (sequence)
3532

36-
import Database.Postgres.SqlValue
33+
import Database.Postgres.SqlValue (SqlValue)
3734

3835
newtype Query a = Query String
3936

@@ -73,7 +70,7 @@ execute_ :: forall eff a. Query a -> Client -> Aff (db :: DB | eff) Unit
7370
execute_ (Query sql) client = void $ runQuery_ sql client
7471

7572
-- | Runs a query and returns all results.
76-
query :: forall eff a p
73+
query :: forall eff a
7774
. (IsForeign a)
7875
=> Query a -> Array SqlValue -> Client -> Aff (db :: DB | eff) (Array a)
7976
query (Query sql) params client = do

src/Database/Postgres/SqlValue.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module Database.Postgres.SqlValue
22
( SqlValue()
3-
, IsSqlValue
3+
, class IsSqlValue
44
, toSql
55
) where
66

77
import Prelude ((<<<))
8-
import Data.Int
9-
import Data.Maybe
8+
import Data.Int (toNumber)
9+
import Data.Maybe (Maybe(..))
1010

1111
foreign import data SqlValue :: *
1212

src/Database/Postgres/Transaction.purs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ module Database.Postgres.Transaction where
22

33
import Prelude
44
import Control.Apply ((*>))
5-
import Control.Monad.Aff
5+
import Control.Monad.Aff (Aff, attempt)
66
import Control.Monad.Error.Class (throwError)
7-
import Data.Either
7+
import Data.Either (either)
88

9-
import Database.Postgres
10-
import Database.Postgres.SqlValue
9+
import Database.Postgres (DB, Client, Query(Query), execute_)
1110

1211
-- | Runs an asynchronous action in a database transaction. The transaction
1312
-- | will be rolled back if the computation fails and committed otherwise.

0 commit comments

Comments
 (0)