<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 10/15/08 23:50, Larry Evans wrote:
<blockquote cite="mid:48F6C82D.1000208@suddenlink.net" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
On 10/15/08 16:05, Larry Evans wrote:</blockquote>
<blockquote cite="mid:48F6C82D.1000208@suddenlink.net" type="cite">
<blockquote cite="mid:48F65B1A.6070203@suddenlink.net" type="cite"><font
face="monospace">I'd like to have an Array indices values<br>
(see <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://haskell.org/onlinereport/array.html">http://haskell.org/onlinereport/array.html</a>)<br>
defined on [minBound::indices ... maxBound::indices].<br>
</font></blockquote>
</blockquote>
[snip]<br>
<blockquote cite="mid:48F6C82D.1000208@suddenlink.net" type="cite"><font
face="monospace">The aforementioned array.html has:<br>
<br>
</font><tt> _ -> error "Array.!: \<br>
\multiply defined array element")<br>
<br>
suggesting it should detect redefinitions; </tt></blockquote>
<br>
<blockquote cite="mid:48F6C82D.1000208@suddenlink.net" type="cite"><tt>Is
this a bug in my ghc library? <br>
</tt></blockquote>
According to:<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/ghc/docs/6.6-latest/html/libraries/base/Data-Array.html">http://www.haskell.org/ghc/docs/6.6-latest/html/libraries/base/Data-Array.html</a><br>
<br>
it's not. It's just implemented differently by libraries:<br>
<br>
<blockquote type="cite">The Haskell 98 Report further specifies that if
any two associations in the list have the same index, the value at that
index is undefined (i.e. bottom). However in GHC's implementation, the
value at such an index is the value part of the last association with
that index in the list.
</blockquote>
So, if I want multiple definitions diagnosed as an error, I'll have to
do it myself :(<br>
<br>
<br>
</body>
</html>