Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/esqueleto/files/
Date: Mon, 14 Sep 2020 07:05:50
Message-Id: 1600067140.78a6edb7f22bd1b5a35e45ae2c4a0d0fbff2b8c0.slyfox@gentoo
1 commit: 78a6edb7f22bd1b5a35e45ae2c4a0d0fbff2b8c0
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sun Sep 13 12:57:47 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 14 07:05:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78a6edb7
7
8 dev-haskell/esqueleto: remove unused patch(es)
9
10 Package-Manager: Portage-3.0.6, Repoman-3.0.1
11 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
12 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
13
14 .../files/esqueleto-2.4.3-persistent-2.5.patch | 165 ---------------------
15 1 file changed, 165 deletions(-)
16
17 diff --git a/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch b/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch
18 deleted file mode 100644
19 index ebff5cb0bd9..00000000000
20 --- a/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch
21 +++ /dev/null
22 @@ -1,165 +0,0 @@
23 -From 675018c54227ce5db4a91a153092d5f4d06f9af0 Mon Sep 17 00:00:00 2001
24 -From: Paul Rouse <pgr@×××××××.org>
25 -Date: Thu, 9 Jun 2016 20:25:34 +0100
26 -Subject: [PATCH 1/3] Changes for persistent-2.5
27 -
28 ----
29 - esqueleto.cabal | 2 +-
30 - src/Database/Esqueleto.hs | 8 ++++----
31 - src/Database/Esqueleto/Internal/Language.hs | 15 +++++----------
32 - src/Database/Esqueleto/Internal/PersistentImport.hs | 12 +++++++++++-
33 - test/Test.hs | 8 ++++----
34 - 5 files changed, 25 insertions(+), 20 deletions(-)
35 -
36 -diff --git a/esqueleto.cabal b/esqueleto.cabal
37 -index 65aa237..1768d2d 100644
38 ---- a/esqueleto.cabal
39 -+++ b/esqueleto.cabal
40 -@@ -66,7 +66,7 @@ library
41 - base >= 4.5 && < 4.9
42 - , bytestring
43 - , text >= 0.11 && < 1.3
44 -- , persistent >= 2.1.1.7 && < 2.3
45 -+ , persistent >= 2.1.1.7
46 - , transformers >= 0.2
47 - , unordered-containers >= 0.2
48 - , tagged >= 0.2
49 -diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
50 -index eb135c2..97e3211 100644
51 ---- a/src/Database/Esqueleto.hs
52 -+++ b/src/Database/Esqueleto.hs
53 -@@ -430,8 +430,8 @@ valJ = val . unValue
54 -
55 - -- | Synonym for 'Database.Persist.Store.delete' that does not
56 - -- clash with @esqueleto@'s 'delete'.
57 --deleteKey :: ( PersistStore (PersistEntityBackend val)
58 -- , MonadIO m
59 -- , PersistEntity val )
60 -- => Key val -> ReaderT (PersistEntityBackend val) m ()
61 -+deleteKey :: ( PersistStore backend
62 -+ , PersistRecordBackend val backend
63 -+ , MonadIO m )
64 -+ => Key val -> ReaderT backend m ()
65 - deleteKey = Database.Persist.delete
66 -diff --git a/src/Database/Esqueleto/Internal/Language.hs b/src/Database/Esqueleto/Internal/Language.hs
67 -index fbe88e2..ab18999 100644
68 ---- a/src/Database/Esqueleto/Internal/Language.hs
69 -+++ b/src/Database/Esqueleto/Internal/Language.hs
70 -@@ -74,13 +74,11 @@ class (Functor query, Applicative query, Monad query) =>
71 - -- In the end, 'fromFinish' is called to materialize the
72 - -- @JOIN@.
73 - fromStart
74 -- :: ( PersistEntity a
75 -- , PersistEntityBackend a ~ backend )
76 -+ :: PersistRecordBackend a backend
77 - => query (expr (PreprocessedFrom (expr (Entity a))))
78 - -- | (Internal) Same as 'fromStart', but entity may be missing.
79 - fromStartMaybe
80 -- :: ( PersistEntity a
81 -- , PersistEntityBackend a ~ backend )
82 -+ :: PersistRecordBackend a backend
83 - => query (expr (PreprocessedFrom (expr (Maybe (Entity a)))))
84 - -- | (Internal) Do a @JOIN@.
85 - fromJoin
86 -@@ -926,8 +924,7 @@ class ToBaseId ent where
87 - -- @
88 - -- person
89 - -- :: ( Esqueleto query expr backend
90 ---- , PersistEntity Person
91 ---- , PersistEntityBackend Person ~ backend
92 -+-- , PersistRecordBackend Person backend
93 - -- ) => expr (Entity Person)
94 - -- (person, blogPost)
95 - -- :: (...) => (expr (Entity Person), expr (Entity BlogPost))
96 -@@ -1054,14 +1051,12 @@ class Esqueleto query expr backend => FromPreprocess query expr backend a where
97 - fromPreprocess :: query (expr (PreprocessedFrom a))
98 -
99 - instance ( Esqueleto query expr backend
100 -- , PersistEntity val
101 -- , PersistEntityBackend val ~ backend
102 -+ , PersistRecordBackend val backend
103 - ) => FromPreprocess query expr backend (expr (Entity val)) where
104 - fromPreprocess = fromStart
105 -
106 - instance ( Esqueleto query expr backend
107 -- , PersistEntity val
108 -- , PersistEntityBackend val ~ backend
109 -+ , PersistRecordBackend val backend
110 - ) => FromPreprocess query expr backend (expr (Maybe (Entity val))) where
111 - fromPreprocess = fromStartMaybe
112 -
113 -diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs b/src/Database/Esqueleto/Internal/PersistentImport.hs
114 -index ad193e0..02fbd20 100644
115 ---- a/src/Database/Esqueleto/Internal/PersistentImport.hs
116 -+++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
117 -@@ -1,7 +1,13 @@
118 -+{-# LANGUAGE CPP #-}
119 -+{-# LANGUAGE ConstraintKinds #-}
120 -+{-# LANGUAGE TypeFamilies #-}
121 - -- | Re-export "Database.Persist.Sql" without any clashes with
122 - -- @esqueleto@.
123 - module Database.Esqueleto.Internal.PersistentImport
124 - ( module Database.Persist.Sql
125 -+#if ! MIN_VERSION_persistent(2,5,0)
126 -+ , PersistRecordBackend
127 -+#endif
128 - ) where
129 -
130 - import Database.Persist.Sql hiding
131 -@@ -10,4 +16,8 @@ import Database.Persist.Sql hiding
132 - , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
133 - , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
134 - , listToJSON, mapToJSON, getPersistMap, limitOffsetOrder, selectSource
135 -- , update )
136 -+ , update, count )
137 -+
138 -+#if ! MIN_VERSION_persistent(2,5,0)
139 -+type PersistRecordBackend record backend = (PersistEntity record, PersistEntityBackend record ~ backend)
140 -+#endif
141 -diff --git a/test/Test.hs b/test/Test.hs
142 -index 80c6784..524bd7c 100644
143 ---- a/test/Test.hs
144 -+++ b/test/Test.hs
145 -@@ -1396,10 +1396,10 @@ main = do
146 -
147 -
148 - insert' :: ( Functor m
149 -- , PersistStore (PersistEntityBackend val)
150 -- , MonadIO m
151 -- , PersistEntity val )
152 -- => val -> ReaderT (PersistEntityBackend val) m (Entity val)
153 -+ , PersistStore backend
154 -+ , PersistRecordBackend val backend
155 -+ , MonadIO m )
156 -+ => val -> ReaderT backend m (Entity val)
157 - insert' v = flip Entity v <$> insert v
158 -
159 -
160 ---
161 -2.9.0
162 -
163 -From 4c9ecd94f2748be52c50c85ca8ed7314e21b9e82 Mon Sep 17 00:00:00 2001
164 -From: Paul Rouse <pgr@×××××××.org>
165 -Date: Thu, 9 Jun 2016 20:29:45 +0100
166 -Subject: [PATCH 2/3] Allow base-4.9 for GHC 8
167 -
168 ----
169 - esqueleto.cabal | 2 +-
170 - 1 file changed, 1 insertion(+), 1 deletion(-)
171 -
172 -diff --git a/esqueleto.cabal b/esqueleto.cabal
173 -index 1768d2d..3b9efb9 100644
174 ---- a/esqueleto.cabal
175 -+++ b/esqueleto.cabal
176 -@@ -63,7 +63,7 @@ library
177 - other-modules:
178 - Database.Esqueleto.Internal.PersistentImport
179 - build-depends:
180 -- base >= 4.5 && < 4.9
181 -+ base >= 4.5 && < 5
182 - , bytestring
183 - , text >= 0.11 && < 1.3
184 - , persistent >= 2.1.1.7 && < 2.6
185 ---
186 -2.9.0
187 -