1 --!!! Array creation, (index,value) list with duplicates.
3 -- Haskell library report 1.3 (and earlier) specifies
4 -- that `array' values created with lists containing dups,
5 -- are undefined ( _|_ ).
7 -- GHC-2.02 (and earlier) does not flag this as such, the
8 -- last (index,value) is instead used.
10 -- The report also specifies `array' is spine strict in
11 -- the (index,value) list argument and to check the
12 -- validity of the index values upon creation, it also
13 -- strict for the indices. To test this, we do (a!1)
14 -- twice, expecting to see the same value..
19 let a1 = array (1,3) (zip (1:[1..3]) ['a'..'d']) in