5a1283435f3e8ed7c64d981c296cf5f4d7a1177a
[ghc-hetmet.git] / ghc / lib / tests / Array / arr004 / Main.hs
1 -- Array - accessing undefined element
2 -- 
3 -- Sample Haskell implementation in the 1.3 Lib report defines
4 -- this as being undefined/error.
5
6 import Array
7
8 main =
9  let a1 = array (1,3) (zip ([1,2]) ['a'..'d']) in
10  print (a1!3)
11
12 -- output: Fail: (Array.!): undefined array element
13
14
15