From 74b33d1fc8aed507305f6de929303749888bde75 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Fri, 9 Mar 2007 05:17:07 +0100 Subject: simplify StackSet api even further (-15 loc) darcs-hash:20070309041707-9c5c1-3c9ef62c25f49b9025f137f73c8d25438a640ff4 --- tests/Properties.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/Properties.hs b/tests/Properties.hs index c36562b..5185314 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -15,9 +15,7 @@ import Data.List (sort,group,sort,intersperse) -- | Height of stack 'n' height :: Int -> StackSet a -> Int -height i w = case index i w of - Nothing -> error $ "height: i out of range: " ++ show i - Just ss -> length ss +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 -- cgit v1.2.3