projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2001-05-18 16:54:04 by simonmar]
[ghc-hetmet.git]
/
ghc
/
tests
/
array
/
should_run
/
arr009.hs
1
-- !!! Array - derived ops
2
--
3
-- testing the well-behavedness of
4
-- derived ops for empty and non-empty arrays
5
--
6
import Array
7
8
main =
9
let
10
a1 = array (1,0) ([]::[(Int,Int)])
11
a2 = array (1,26) (zip [1..] ['a'..'z'])
12
13
dump a = (bounds a, indices a, elems a, assocs a)
14
in
15
print (dump a1) >>
16
print (dump a2)
17