@@ -62,6 +62,8 @@ import Numeric.Natural
6262 ( Natural )
6363import Test.Hspec
6464 ( Spec , describe )
65+ import Test.Key
66+ ( Key2 , Key4 )
6567import Test.QuickCheck
6668 ( Arbitrary (.. )
6769 , CoArbitrary (.. )
@@ -70,7 +72,6 @@ import Test.QuickCheck
7072 , Testable
7173 , arbitrarySizedIntegral
7274 , checkCoverage
73- , choose
7475 , coarbitraryIntegral
7576 , coarbitraryShow
7677 , frequency
@@ -139,18 +140,8 @@ instance Function Text where
139140-- Test keys
140141--------------------------------------------------------------------------------
141142
142- newtype Key = Key Int
143- deriving (Enum , Eq , Integral , Num , Ord , Real , Show )
144-
145- instance Arbitrary Key where
146- arbitrary = Key <$> choose (0 , 15 )
147- shrink (Key k) = Key <$> shrink k
148-
149- instance CoArbitrary Key where
150- coarbitrary = coarbitraryIntegral
151-
152- instance Function Key where
153- function = functionIntegral
143+ type SmallKey = Key2
144+ type Key = Key4
154145
155146--------------------------------------------------------------------------------
156147-- Test constraints
@@ -198,14 +189,14 @@ testValueTypesAll =
198189 , TestValueType (Proxy @ (Text ))
199190 , TestValueType (Proxy @ [Int ])
200191 , TestValueType (Proxy @ [Natural ])
201- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Int )))
202- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
192+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Int )))
193+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
203194 ]
204195
205196testValueTypesGroup :: [TestValueType Group ]
206197testValueTypesGroup =
207198 [ TestValueType (Proxy @ (Sum Int ))
208- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Int )))
199+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Int )))
209200 ]
210201
211202testValueTypesMonus :: [TestValueType Monus ]
@@ -214,7 +205,7 @@ testValueTypesMonus =
214205 , TestValueType (Proxy @ (Set Int ))
215206 , TestValueType (Proxy @ (Set Natural ))
216207 , TestValueType (Proxy @ (Sum Natural ))
217- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
208+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
218209 ]
219210
220211testValueTypesLeftReductive :: [TestValueType LeftReductive ]
@@ -231,7 +222,7 @@ testValueTypesLeftReductive =
231222 , TestValueType (Proxy @ (Text ))
232223 , TestValueType (Proxy @ [Int ])
233224 , TestValueType (Proxy @ [Natural ])
234- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
225+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
235226 ]
236227
237228testValueTypesRightReductive :: [TestValueType RightReductive ]
@@ -248,7 +239,7 @@ testValueTypesRightReductive =
248239 , TestValueType (Proxy @ (Text ))
249240 , TestValueType (Proxy @ [Int ])
250241 , TestValueType (Proxy @ [Natural ])
251- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
242+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
252243 ]
253244
254245testValueTypesReductive :: [TestValueType Reductive ]
@@ -259,7 +250,7 @@ testValueTypesReductive =
259250 , TestValueType (Proxy @ (Set Natural ))
260251 , TestValueType (Proxy @ (Sum Int ))
261252 , TestValueType (Proxy @ (Sum Natural ))
262- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
253+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
263254 ]
264255
265256testValueTypesLeftGCDMonoid :: [TestValueType LeftGCDMonoid ]
@@ -270,7 +261,7 @@ testValueTypesLeftGCDMonoid =
270261 , TestValueType (Proxy @ (Set Natural ))
271262 , TestValueType (Proxy @ (Sum Natural ))
272263 , TestValueType (Proxy @ (Text ))
273- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
264+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
274265 ]
275266
276267testValueTypesRightGCDMonoid :: [TestValueType RightGCDMonoid ]
@@ -281,7 +272,7 @@ testValueTypesRightGCDMonoid =
281272 , TestValueType (Proxy @ (Set Natural ))
282273 , TestValueType (Proxy @ (Sum Natural ))
283274 , TestValueType (Proxy @ (Text ))
284- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
275+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
285276 ]
286277
287278testValueTypesOverlappingGCDMonoid :: [TestValueType OverlappingGCDMonoid ]
@@ -292,7 +283,7 @@ testValueTypesOverlappingGCDMonoid =
292283 , TestValueType (Proxy @ (Set Natural ))
293284 , TestValueType (Proxy @ (Sum Natural ))
294285 , TestValueType (Proxy @ (Text ))
295- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
286+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
296287 ]
297288
298289testValueTypesGCDMonoid :: [TestValueType GCDMonoid ]
@@ -301,7 +292,7 @@ testValueTypesGCDMonoid =
301292 , TestValueType (Proxy @ (Set Int ))
302293 , TestValueType (Proxy @ (Set Natural ))
303294 , TestValueType (Proxy @ (Sum Natural ))
304- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
295+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
305296 ]
306297
307298testValueTypesLCMMonoid :: [TestValueType LCMMonoid ]
@@ -310,7 +301,7 @@ testValueTypesLCMMonoid =
310301 , TestValueType (Proxy @ (Set Int ))
311302 , TestValueType (Proxy @ (Set Natural ))
312303 , TestValueType (Proxy @ (Sum Natural ))
313- , TestValueType (Proxy @ (MonoidMap Ordering (Sum Natural )))
304+ , TestValueType (Proxy @ (MonoidMap SmallKey (Sum Natural )))
314305 ]
315306
316307--------------------------------------------------------------------------------
0 commit comments