Skip to content

Commit 1a8c40e

Browse files
author
qz
committed
build for 8.2.2 & 8.4.4 with cpp
1 parent 2a10e6c commit 1a8c40e

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

src/Database/PostgreSQL/Protocol/Store/Encode.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
module Database.PostgreSQL.Protocol.Store.Encode
23
( Encode
34
, getEncodeLen
@@ -26,15 +27,21 @@ import Data.ByteString.Internal (toForeignPtr)
2627
import Data.Store.Core (Poke(..), unsafeEncodeWith, pokeStatePtr,
2728
pokeFromForeignPtr)
2829

30+
import qualified Data.Semigroup as Sem
31+
2932
data Encode = Encode {-# UNPACK #-} !Int !(Poke ())
3033

31-
instance Semigroup Encode where
34+
instance Sem.Semigroup Encode where
3235
{-# INLINE (<>) #-}
3336
(Encode len1 f1) <> (Encode len2 f2) = Encode (len1 + len2) (f1 *> f2)
3437

3538
instance Monoid Encode where
3639
{-# INLINE mempty #-}
3740
mempty = Encode 0 . Poke $ \_ offset -> pure (offset, ())
41+
#if !(MIN_VERSION_base(4,11,0))
42+
mappend = (Sem.<>)
43+
#endif
44+
3845

3946
instance Show Encode where
4047
show (Encode len _) = "Encode instance of length " ++ show len

stack-ghc8.2.2.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file was automatically generated by 'stack init'
2+
#
3+
resolver: lts-11.22
4+
5+
packages:
6+
- '.'
7+
# Dependency packages to be pulled from upstream that are not in the resolver
8+
# (e.g., acme-missiles-0.3)
9+
extra-deps:
10+
- socket-0.8.2.0
11+
- socket-unix-0.2.0.0
12+
# <<<<<<< HEAD
13+
# =======
14+
# - store-core-0.3
15+
# - QuickCheck-2.9.2
16+
# >>>>>>> QuickCheck tests for existing codecs
17+
18+
# Override default flag values for local packages and extra-deps
19+
flags: {}
20+
21+
# Extra package databases containing global packages
22+
extra-package-dbs: []

stack-ghc8.4.4.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file was automatically generated by 'stack init'
2+
#
3+
resolver: lts-12.26
4+
5+
packages:
6+
- '.'
7+
# Dependency packages to be pulled from upstream that are not in the resolver
8+
# (e.g., acme-missiles-0.3)
9+
extra-deps:
10+
- socket-0.8.2.0
11+
- socket-unix-0.2.0.0
12+
# <<<<<<< HEAD
13+
# =======
14+
# - store-core-0.3
15+
# - QuickCheck-2.9.2
16+
# >>>>>>> QuickCheck tests for existing codecs
17+
18+
# Override default flag values for local packages and extra-deps
19+
flags: {}
20+
21+
# Extra package databases containing global packages
22+
extra-package-dbs: []

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy