[project @ 1997-03-14 07:52:06 by simonpj]
[ghc-hetmet.git] / ghc / lib / tests / Array / arr004 / Main.hs
diff --git a/ghc/lib/tests/Array/arr004/Main.hs b/ghc/lib/tests/Array/arr004/Main.hs
new file mode 100644 (file)
index 0000000..5a12834
--- /dev/null
@@ -0,0 +1,15 @@
+-- Array - accessing undefined element
+-- 
+-- Sample Haskell implementation in the 1.3 Lib report defines
+-- this as being undefined/error.
+
+import Array
+
+main =
+ let a1 = array (1,3) (zip ([1,2]) ['a'..'d']) in
+ print (a1!3)
+
+-- output: Fail: (Array.!): undefined array element
+
+
+