[project @ 1997-03-14 07:52:06 by simonpj]
[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