Skip to content

Commit a3f1fcd

Browse files
authored
Merge pull request #6 from phadej/updates-2019-09-19
Updates 2019-09-19
2 parents 9fc28c5 + 0e3e6f8 commit a3f1fcd

File tree

4 files changed

+87
-64
lines changed

4 files changed

+87
-64
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
7-
# version: 0.5.20190908
7+
# version: 0.5.20190916
88
#
99
language: c
1010
dist: xenial

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Patches welcome!
2+
3+
- If you are only going to bump bounds:
4+
- If it's really **only bounds**, please simply open an issue (so you'll have a URL to refer to). I have a semi-automated process to make revisions, pull requests only disturb it.
5+
- If patch includes **source code change** (i.e. I'll need to make a release), and it's a patch to support **newer base/GHC version**:
6+
- Amend `tested-with` to include that GHC
7+
- Regenerate `.travis.yml` with `haskell-ci regenerate` (get the latest from [GitHub haskell-ci/haskell-ci](https://github.com/haskell-ci/haskell-ci))
8+
9+
- Don't edit `CHANGELOG.md`, rather include a copyable entry in your pull request description. I often process pull requests in bulk, and everyone editing the `CHANGELOG.md` causes unnecessary conflicts.
10+
11+
- I use [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) to format imports. I encourage you to use it too, when contributing.
12+
- General code style is 4 spaces, just look around how it looks, it's not so strict.

postgresql-libpq.cabal

Lines changed: 71 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,105 @@
1-
Name: postgresql-libpq
2-
Version: 0.9.4.2
3-
x-revision: 1
4-
Synopsis: low-level binding to libpq
5-
6-
Description: This is a binding to libpq: the C application
7-
programmer's interface to PostgreSQL. libpq is a
8-
set of library functions that allow client
9-
programs to pass queries to the PostgreSQL
10-
backend server and to receive the results of
11-
these queries.
12-
13-
Homepage: https://github.com/phadej/postgresql-libpq
14-
License: BSD3
15-
License-file: LICENSE
16-
Author: Grant Monroe, Leon P Smith, Joey Adams
17-
Maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
18-
Copyright: (c) 2010 Grant Monroe
19-
(c) 2011 Leon P Smith
20-
Category: Database
21-
Build-type: Custom
22-
Extra-source-files: cbits/noticehandlers.h
23-
Cabal-version: >=1.8
24-
Tested-with:
25-
GHC==7.0.4,
26-
GHC==7.2.2,
27-
GHC==7.4.2,
28-
GHC==7.6.3,
29-
GHC==7.8.4,
30-
GHC==7.10.3,
31-
GHC==8.0.2,
32-
GHC==8.2.2,
33-
GHC==8.4.4,
34-
GHC==8.6.5,
35-
GHC==8.8.1
36-
37-
extra-source-files:
38-
CHANGELOG.md
39-
40-
Custom-setup
1+
name: postgresql-libpq
2+
version: 0.9.4.2
3+
x-revision: 1
4+
synopsis: low-level binding to libpq
5+
description:
6+
This is a binding to libpq: the C application
7+
programmer's interface to PostgreSQL. libpq is a
8+
set of library functions that allow client
9+
programs to pass queries to the PostgreSQL
10+
backend server and to receive the results of
11+
these queries.
12+
13+
homepage: https://github.com/phadej/postgresql-libpq
14+
license: BSD3
15+
license-file: LICENSE
16+
author: Grant Monroe, Leon P Smith, Joey Adams
17+
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
18+
copyright:
19+
(c) 2010 Grant Monroe
20+
(c) 2011 Leon P Smith
21+
22+
category: Database
23+
build-type: Custom
24+
extra-source-files: cbits/noticehandlers.h
25+
cabal-version: >=1.8
26+
tested-with:
27+
GHC ==7.0.4
28+
|| ==7.2.2
29+
|| ==7.4.2
30+
|| ==7.6.3
31+
|| ==7.8.4
32+
|| ==7.10.3
33+
|| ==8.0.2
34+
|| ==8.2.2
35+
|| ==8.4.4
36+
|| ==8.6.5
37+
|| ==8.8.1
38+
39+
extra-source-files: CHANGELOG.md
40+
41+
custom-setup
4142
setup-depends:
42-
base >= 4.3 && <5, Cabal >= 1.10 && <3.1
43+
base >=4.3 && <5
44+
, Cabal >=1.10 && <3.1
4345

4446
-- If true, use pkg-config, otherwise use the pg_config based build
4547
-- configuration
46-
Flag use-pkg-config
48+
flag use-pkg-config
4749
default: False
4850
manual: True
4951

50-
Library
51-
hs-source-dirs: src
52-
c-sources: cbits/noticehandlers.c
53-
include-dirs: cbits
54-
Exposed-modules: Database.PostgreSQL.LibPQ
55-
Database.PostgreSQL.LibPQ.Internal
56-
Build-depends: base >=4.3 && <4.14
57-
, bytestring >=0.9.1.0 && <0.11
52+
library
53+
hs-source-dirs: src
54+
c-sources: cbits/noticehandlers.c
55+
include-dirs: cbits
56+
exposed-modules:
57+
Database.PostgreSQL.LibPQ
58+
Database.PostgreSQL.LibPQ.Internal
59+
60+
build-depends:
61+
base >=4.3 && <4.14
62+
, bytestring >=0.9.1.0 && <0.11
5863

5964
if !os(windows)
60-
Build-depends: unix >=2.4.2.0 && <2.8
65+
build-depends: unix >=2.4.2.0 && <2.8
6166

6267
if os(windows)
63-
Build-depends: Win32 >=2.2.0.2 && <2.7
68+
build-depends: Win32 >=2.2.0.2 && <2.7
6469

65-
GHC-Options: -Wall
70+
ghc-options: -Wall
6671

6772
if flag(use-pkg-config)
68-
Pkgconfig-depends: libpq >=9.3
73+
pkgconfig-depends: libpq ==9.3 || >9.3
74+
6975
else
7076
if os(windows)
7177
-- Due to https://sourceware.org/bugzilla/show_bug.cgi?id=22948,
7278
-- if we specify pq instead of libpq, then ld might link against
7379
-- libpq.dll directly, which can lead to segfaults. As a temporary hack,
7480
-- we force ld to link against the libpq.lib import library directly
7581
-- by specifying libpq here.
76-
Extra-Libraries: libpq
82+
extra-libraries: libpq
83+
7784
else
78-
Extra-Libraries: pq
85+
extra-libraries: pq
86+
7987
if os(openbsd)
80-
Extra-Libraries: crypto ssl
88+
extra-libraries:
89+
crypto
90+
ssl
8191

8292
-- Other-modules:
83-
Build-tools: hsc2hs
93+
build-tools: hsc2hs -any
8494

8595
test-suite smoke
8696
type: exitcode-stdio-1.0
8797
main-is: Smoke.hs
8898
hs-source-dirs: test
8999
build-depends:
90-
base,
91-
bytestring,
92-
postgresql-libpq
100+
base
101+
, bytestring
102+
, postgresql-libpq
93103

94104
source-repository head
95105
type: git

src/Database/PostgreSQL/LibPQ/Internal.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
--
1212
-----------------------------------------------------------------------------
1313

14-
{-# LANGUAGE BangPatterns, EmptyDataDecls #-}
14+
{-# LANGUAGE BangPatterns #-}
15+
{-# LANGUAGE EmptyDataDecls #-}
1516

1617
module Database.PostgreSQL.LibPQ.Internal where
1718

19+
import Control.Concurrent.MVar (MVar)
1820
import Foreign
19-
import Control.Concurrent.MVar ( MVar )
2021

2122

2223
-- | 'Connection' encapsulates a connection to the backend.

0 commit comments

Comments
 (0)