From dd329247c047b05f6753e003bd276c3c04254a03 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 12 Feb 2004 14:58:46 +0000 Subject: [PATCH] [project @ 2004-02-12 14:58:46 by simonpj] Document non-std behaviour of array --- ghc/docs/users_guide/bugs.sgml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/docs/users_guide/bugs.sgml b/ghc/docs/users_guide/bugs.sgml index 3b1ec99..a81f193 100644 --- a/ghc/docs/users_guide/bugs.sgml +++ b/ghc/docs/users_guide/bugs.sgml @@ -97,12 +97,14 @@ Multiply-defined array elements—not checked: - This code fragment should + This code fragment should elicit a fatal error, but it does not: main = print (array (1,1) [(1,2), (1,3)]) - +GHC's implemetation of array takes the value of an +array slot from the last (index,value) pair in the list, and does no +checking for duplicates. The reason for this is efficiency, pure and simple. -- 1.7.10.4