summaryrefslogtreecommitdiff
path: root/testsuite/tests/array/should_run/arr008.hs
blob: 14152c5a9d2c40546fa1e0e6d2fe5656f218ab0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- !!! Array - out-of-range (index,value) pairs
-- 
-- supplying a list containing one or more pairs 
-- with out-of-range index is undefined.
--
--
import Data.Array

main = 
 let 
  a1 = array (1::Int,0) []
  a2 = array (0::Int,1) (zip [0..] ['a'..'z'])
 in
 print (a1::Array Int Int) >> print a2