Skip to content

Commit 43c45f3

Browse files
Use SmallKey in tests with nested MonoidMap objects.
1 parent 6bf6ed1 commit 43c45f3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

components/monoidmap-test/Test/Common.hs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import Numeric.Natural
6363
import Test.Hspec
6464
( Spec, describe )
6565
import Test.Key
66-
( Key4 )
66+
( Key2, Key4 )
6767
import Test.QuickCheck
6868
( Arbitrary (..)
6969
, CoArbitrary (..)
@@ -140,6 +140,7 @@ instance Function Text where
140140
-- Test keys
141141
--------------------------------------------------------------------------------
142142

143+
type SmallKey = Key2
143144
type Key = Key4
144145

145146
--------------------------------------------------------------------------------
@@ -188,14 +189,14 @@ testValueTypesAll =
188189
, TestValueType (Proxy @(Text))
189190
, TestValueType (Proxy @[Int])
190191
, TestValueType (Proxy @[Natural])
191-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Int)))
192-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
192+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Int)))
193+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
193194
]
194195

195196
testValueTypesGroup :: [TestValueType Group]
196197
testValueTypesGroup =
197198
[ TestValueType (Proxy @(Sum Int))
198-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Int)))
199+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Int)))
199200
]
200201

201202
testValueTypesMonus :: [TestValueType Monus]
@@ -204,7 +205,7 @@ testValueTypesMonus =
204205
, TestValueType (Proxy @(Set Int))
205206
, TestValueType (Proxy @(Set Natural))
206207
, TestValueType (Proxy @(Sum Natural))
207-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
208+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
208209
]
209210

210211
testValueTypesLeftReductive :: [TestValueType LeftReductive]
@@ -221,7 +222,7 @@ testValueTypesLeftReductive =
221222
, TestValueType (Proxy @(Text))
222223
, TestValueType (Proxy @[Int])
223224
, TestValueType (Proxy @[Natural])
224-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
225+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
225226
]
226227

227228
testValueTypesRightReductive :: [TestValueType RightReductive]
@@ -238,7 +239,7 @@ testValueTypesRightReductive =
238239
, TestValueType (Proxy @(Text))
239240
, TestValueType (Proxy @[Int])
240241
, TestValueType (Proxy @[Natural])
241-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
242+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
242243
]
243244

244245
testValueTypesReductive :: [TestValueType Reductive]
@@ -249,7 +250,7 @@ testValueTypesReductive =
249250
, TestValueType (Proxy @(Set Natural))
250251
, TestValueType (Proxy @(Sum Int))
251252
, TestValueType (Proxy @(Sum Natural))
252-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
253+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
253254
]
254255

255256
testValueTypesLeftGCDMonoid :: [TestValueType LeftGCDMonoid]
@@ -260,7 +261,7 @@ testValueTypesLeftGCDMonoid =
260261
, TestValueType (Proxy @(Set Natural))
261262
, TestValueType (Proxy @(Sum Natural))
262263
, TestValueType (Proxy @(Text))
263-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
264+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
264265
]
265266

266267
testValueTypesRightGCDMonoid :: [TestValueType RightGCDMonoid]
@@ -271,7 +272,7 @@ testValueTypesRightGCDMonoid =
271272
, TestValueType (Proxy @(Set Natural))
272273
, TestValueType (Proxy @(Sum Natural))
273274
, TestValueType (Proxy @(Text))
274-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
275+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
275276
]
276277

277278
testValueTypesOverlappingGCDMonoid :: [TestValueType OverlappingGCDMonoid]
@@ -282,7 +283,7 @@ testValueTypesOverlappingGCDMonoid =
282283
, TestValueType (Proxy @(Set Natural))
283284
, TestValueType (Proxy @(Sum Natural))
284285
, TestValueType (Proxy @(Text))
285-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
286+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
286287
]
287288

288289
testValueTypesGCDMonoid :: [TestValueType GCDMonoid]
@@ -291,7 +292,7 @@ testValueTypesGCDMonoid =
291292
, TestValueType (Proxy @(Set Int))
292293
, TestValueType (Proxy @(Set Natural))
293294
, TestValueType (Proxy @(Sum Natural))
294-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
295+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
295296
]
296297

297298
testValueTypesLCMMonoid :: [TestValueType LCMMonoid]
@@ -300,7 +301,7 @@ testValueTypesLCMMonoid =
300301
, TestValueType (Proxy @(Set Int))
301302
, TestValueType (Proxy @(Set Natural))
302303
, TestValueType (Proxy @(Sum Natural))
303-
, TestValueType (Proxy @(MonoidMap Ordering (Sum Natural)))
304+
, TestValueType (Proxy @(MonoidMap SmallKey (Sum Natural)))
304305
]
305306

306307
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)