summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-03-09 05:17:07 +0100
committerDon Stewart <dons@cse.unsw.edu.au>2007-03-09 05:17:07 +0100
commit74b33d1fc8aed507305f6de929303749888bde75 (patch)
tree19858fbf18a84e271bcf7f90e817ecc1d9480ff2 /tests
parent6f6785519398a926620a964e8a5125f527adcaaa (diff)
downloadmetatile-74b33d1fc8aed507305f6de929303749888bde75.tar
metatile-74b33d1fc8aed507305f6de929303749888bde75.zip
simplify StackSet api even further (-15 loc)
darcs-hash:20070309041707-9c5c1-3c9ef62c25f49b9025f137f73c8d25438a640ff4
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs4
1 files changed, 1 insertions, 3 deletions
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