[project @ 1997-12-19 12:22:06 by simonm]
[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