projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1997-12-19 12:22:55 by simonm]
[ghc-hetmet.git]
/
ghc
/
lib
/
tests
/
Array
/
arr009
/
Main.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