From 393f376f24bda4d5dd8745d45d1ff5ef7b31aab5 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Thu, 19 Apr 2007 03:27:05 +0200 Subject: Parameterise StackSet by two index types, rather than breaking abstraction darcs-hash:20070419012705-9c5c1-3aa97e02123af08c3f4500c9e9c3bb7ab4121652 --- tests/Properties.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/Properties.hs b/tests/Properties.hs index e69c7f9..7eefe67 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -17,11 +17,11 @@ import Data.Map (keys,elems) -- QuickCheck properties for the StackSet -- | Height of stack 'n' -height :: WorkspaceId -> StackSet a -> Int +height :: Int -> T -> Int height i w = length (index i w) -- build (non-empty) StackSets with between 1 and 100 stacks -instance (Ord a, Arbitrary a) => Arbitrary (StackSet a) where +instance (Integral i, Integral j, Ord a, Arbitrary a) => Arbitrary (StackSet i j a) where arbitrary = do sz <- choose (1,20) n <- choose (0,sz-1) @@ -58,7 +58,7 @@ prop_peekmember x = case peek x of Nothing -> True {- then we don't know anything -} where _ = x :: T -type T = StackSet Int +type T = StackSet Int Int Int prop_delete_uniq i x = not (member i x) ==> delete i x == x where _ = x :: T -- cgit v1.2.3