summaryrefslogtreecommitdiff
path: root/testsuite/tests/array/should_run/arr004.hs
blob: 0d7e5b445fc94758e99178721e4507e75e69482c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- !!! Array - accessing undefined element
-- 
-- Sample Haskell implementation in the 1.3 Lib report defines
-- this as being undefined/error.

import Data.Array

main =
 let a1 = array (1,3) (zip ([1,2]) ['a'..'d']) in
 print (a1!3)

-- output: Fail: (Array.!): undefined array element