diff options
Diffstat (limited to 'testsuite/tests/array/should_run/arr004.hs')
-rw-r--r-- | testsuite/tests/array/should_run/arr004.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/array/should_run/arr004.hs b/testsuite/tests/array/should_run/arr004.hs new file mode 100644 index 0000000000..0d7e5b445f --- /dev/null +++ b/testsuite/tests/array/should_run/arr004.hs @@ -0,0 +1,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 + + + |