summaryrefslogtreecommitdiff
blob: e27746b8573115c1c9d0d20d247bb2585456d17d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
--- a/src/CompositeTest.hs
+++ b/src/CompositeTest.hs
@@ -1,6 +1,8 @@
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-} -- FIXME
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
 module CompositeTest where
 
--- a/src/CustomPersistFieldTest.hs
+++ b/src/CustomPersistFieldTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module CustomPersistFieldTest (specsWith, customFieldMigrate) where
 
--- a/src/CustomPrimaryKeyReferenceTest.hs
+++ b/src/CustomPrimaryKeyReferenceTest.hs
@@ -1,4 +1,6 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
 -- This test is based on this issue: https://github.com/yesodweb/persistent/issues/421
 -- The primary thing this is testing is the migration, thus the test code itself being mostly negligible.
--- a/src/DataTypeTest.hs
+++ b/src/DataTypeTest.hs
@@ -1,5 +1,8 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module DataTypeTest
     ( specsWith
--- a/src/EmbedOrderTest.hs
+++ b/src/EmbedOrderTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module EmbedOrderTest (specsWith, embedOrderMigrate, cleanDB) where
 
--- a/src/EmbedTest.hs
+++ b/src/EmbedTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-orphans -O0 #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module EmbedTest (specsWith, cleanDB, embedMigrate) where
--- a/src/EmptyEntityTest.hs
+++ b/src/EmptyEntityTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module EmptyEntityTest (specsWith, migration, cleanDB) where
 
--- a/src/EntityEmbedTest.hs
+++ b/src/EntityEmbedTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module EntityEmbedTest where
 
 -- because we are using a type alias we need to declare in a separate module
--- a/src/EquivalentTypeTest.hs
+++ b/src/EquivalentTypeTest.hs
@@ -1,4 +1,6 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 
--- a/src/HtmlTest.hs
+++ b/src/HtmlTest.hs
@@ -1,4 +1,8 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module HtmlTest (specsWith, cleanDB, htmlMigrate) where
 
--- a/src/LargeNumberTest.hs
+++ b/src/LargeNumberTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module LargeNumberTest where
 
 import Data.Word
--- a/src/MaxLenTest.hs
+++ b/src/MaxLenTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 
 module MaxLenTest (specsWith, maxlenMigrate) where
--- a/src/MigrationColumnLengthTest.hs
+++ b/src/MigrationColumnLengthTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module MigrationColumnLengthTest where
 
 import qualified Data.Text as T
--- a/src/MigrationIdempotencyTest.hs
+++ b/src/MigrationIdempotencyTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module MigrationIdempotencyTest where
 
 import qualified Data.Text as T
--- a/src/MigrationOnlyTest.hs
+++ b/src/MigrationOnlyTest.hs
@@ -1,5 +1,8 @@
 {-# LANGUAGE UndecidableInstances #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module MigrationOnlyTest (specsWith, migrateAll1, migrateAll2) where
 
 import qualified Data.Text as T
--- a/src/MigrationTest.hs
+++ b/src/MigrationTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module MigrationTest where
 
 import Database.Persist.TH
--- a/src/PersistUniqueTest.hs
+++ b/src/PersistUniqueTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module PersistUniqueTest where
 
 import Init
--- a/src/PersistentTestModels.hs
+++ b/src/PersistentTestModels.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE UndecidableInstances #-} -- FIXME
+{-# LANGUAGE DerivingStrategies #-}
 module PersistentTestModels where
 
 import Data.Aeson
--- a/src/PrimaryTest.hs
+++ b/src/PrimaryTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module PrimaryTest where
 
 import Init
--- a/src/Recursive.hs
+++ b/src/Recursive.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module Recursive (specsWith, recursiveMigrate, cleanup) where
 
--- a/src/RenameTest.hs
+++ b/src/RenameTest.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module RenameTest where
 
 import qualified Data.Map as Map
--- a/src/SumTypeTest.hs
+++ b/src/SumTypeTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# OPTIONS_GHC -Wno-unused-top-binds #-}
 module SumTypeTest (specsWith, sumTypeMigrate) where
 
--- a/src/TransactionLevelTest.hs
+++ b/src/TransactionLevelTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 
 module TransactionLevelTest where
 
--- a/src/TreeTest.hs
+++ b/src/TreeTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-} -- FIXME
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module TreeTest where
 
 import Database.Persist.TH (mkDeleteCascade)
--- a/src/UniqueTest.hs
+++ b/src/UniqueTest.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DerivingStrategies #-}
+{-# LANGUAGE StandaloneDeriving #-}
 module UniqueTest where
 
 import Init