From: simonpj Date: Thu, 12 Feb 2004 14:58:46 +0000 (+0000) Subject: [project @ 2004-02-12 14:58:46 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~86 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=dd329247c047b05f6753e003bd276c3c04254a03;p=ghc-hetmet.git [project @ 2004-02-12 14:58:46 by simonpj] Document non-std behaviour of array --- 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.