__color__	__group__	ticket	summary	component	version	milestone	type	owner	status	created	_changetime	_description	_reporter
3	Active Tickets	1	Accessing undefined value in DiffArray returns misleading error message	component1			defect	somebody	new	2009-08-02T14:44:12Z+0100	2009-08-02T14:44:12Z+0100	"Originally reported here: http://hackage.haskell.org/trac/ghc/ticket/1259

{{{
Prelude> :m + Data.Array.Diff
Prelude Data.Array.Diff> :t array
array :: (Ix i, IArray a e) => (i, i) -> [(i, e)] -> a i e
Prelude Data.Array.Diff> array (1,1) [] :: DiffArray Int Int
array (1,1) [(1,*** Exception: MArray: undefined array element
}}}
Since !DiffArray isn't a MArray(it implements IArray), this is misleading. It should either say IArray or better !DiffArray: undefined array element.
"	igloo
3	Active Tickets	2	DiffArray performance unusable for advertized purpose	component1			defect	somebody	new	2009-08-02T14:45:13Z+0100	2009-11-30T18:00:08Z+0000	"Originally reported here: http://hackage.haskell.org/trac/ghc/ticket/2727

(cf. this [http://www.haskell.org/pipermail/glasgow-haskell-users/2008-October/015851.html ghc-users thread])

`Data.Array.Diff.DiffArray` is unusably slow. Sometimes even `Data.Array.Array` is faster in single-threaded use, defeating the purpose. The attached code tries to demonstrate the issue, if I got the single-threadedness via `$!` right (default compilation `ghc --make SlowDiffArray.hs` gives `Array`, build with `-DUseDiff` to get `DiffArray`).

As I happened to have some older ghcs around, I tried those as well, and it seems the issue got worse around 6.8.3 (`SlowDiffArrayA-<version>`: Array; `SlowDiffArrayDA-<version>`: DiffArray):
{{{
$ for i in *.exe ; do  echo $i; time ./$i; done
SlowDiffArrayA-61120081004.exe
9990001

real    0m0.307s
user    0m0.015s
sys     0m0.015s
SlowDiffArrayA-641.exe
9990001

real    0m0.261s
user    0m0.030s
sys     0m0.000s
SlowDiffArrayA-661.exe
9990001

real    0m0.260s
user    0m0.015s
sys     0m0.000s
SlowDiffArrayA-683.exe
9990001

real    0m0.232s
user    0m0.015s
sys     0m0.000s
SlowDiffArrayDA-61120081004.exe
9990001

real    0m12.932s
user    0m0.031s
sys     0m0.000s
SlowDiffArrayDA-641.exe
9990001

real    0m7.114s
user    0m0.015s
sys     0m0.016s
SlowDiffArrayDA-661.exe
9990001

real    0m5.774s
user    0m0.015s
sys     0m0.015s
SlowDiffArrayDA-683.exe
9990001

real    0m12.814s
user    0m0.015s
sys     0m0.000s
}}}
(measured on Pentium M 760, 2GHz, Windows XP)

[the majority of the issue probably lies in the `DiffArray` implementation, hence component `libraries`, but it seems that compiler and runtime system also play a role]"	igloo
