summaryrefslogtreecommitdiff
path: root/patches/packages-haskell-ghc-9.14-mono-traversable-fix-test-suite.diff
blob: a9709f77fdecb486a2afb3bd0f7dd83c899cfb36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/test/Main.hs b/test/Main.hs
index 87166598..2cbc031d 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -357,7 +357,13 @@ main = hspec $ do
         test "List" ([5 :: Int])
 
     describe "Containers" $ do
-        let test typ dummy xlookup xinsert xdelete = describe typ $ do
+        let test :: (IsMap a, Eq a, Show a, MapValue a ~ Int, ContainerKey a ~ Int)
+                 => String -> a
+                 -> (ContainerKey a -> a -> Maybe (MapValue a)) -- ^ lookup
+                 -> (ContainerKey a -> MapValue a -> a -> a)    -- ^ insert
+                 -> (ContainerKey a -> a -> a)                  -- ^ delete
+                 -> Spec
+            test typ dummy xlookup xinsert xdelete = describe typ $ do
                 prop "difference" $ \(DuplPairs xs) (DuplPairs ys) ->
                     let m1 = mapFromList xs `difference` mapFromList ys
                         m2 = mapFromListAs (xs `difference` ys) dummy