prop_sort4 :: Key -> Key -> Key -> Key -> Bool
prop_sort4 a b c d =
  all (== (keys, values)) . map toArray $ List.permutations [a, b, c, d]
  where toArray ls = sort4 (Array.listArray (0,3) ls) (Array.listArray (0,3) ls)
        keys = Array.listArray (0,3) $ List.sort [a, b, c, d]
        values = Array.listArray (0,3) $ List.sort [a, b, c, d]
prop_sort4 :: Key -> Key -> Key -> Key -> Bool
prop_sort4 a b c d =
  all (== (keys, values)) . map toArray $ List.permutations [a, b, c, d]
  where toArray ls = sort4 (Array.listArray (0,3) ls) (Array.listArray (0,3) ls)
        keys = Array.listArray (0,3) $ List.sort [a, b, c, d]
        values = Array.listArray (0,3) $ List.sort [a, b, c, d]
prop_sort4 a b c d =
  all (== (keys, values)) . map toArray $ List.permutations [a, b, c, d]
  where toArray ls = sort4 (Array.listArray (0,3) ls) (Array.listArray (0,3) ls)
        keys = Array.listArray (0,3) $ List.sort [a, b, c, d]
        values = Array.listArray (0,3) $ List.sort [a, b, c, d]