[Haskell] RE: Hugs/GHC incompatibility

Simon Peyton-Jones simonpj at microsoft.com
Wed Feb 4 08:43:29 EST 2004


Yes, that's it.  We don't want an extra conditional test on every store,
plus perhaps an array of bits to record which items have been filled.

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org]
On Behalf Of Iavor S.
| Diatchki
| Sent: 03 February 2004 18:23
| To: Wolfgang Jeltsch
| Cc: The Haskell Mailing List
| Subject: Re: [Haskell] RE: Hugs/GHC incompatibility
| 
| hi,
| i am speculating here, but i guess that if double initializations were
to
| result in _|_ one would have to check if a cell has already been
| initialized,
| and if so replace it with _|_.
| currently ghc probably simply overwrites the array elements.
| i personally prefer ghc's behavior.
| -iavor
| 
| Wolfgang Jeltsch wrote:
| 
| >Am Dienstag, 3. Februar 2004 18:17 schrieb Simon Peyton-Jones:
| >
| >
| >>>I think, I've found the problem. GHC seems to not implement
| >>>Data.Array.array correctly. The implementation doesn't adhere to
the
| >>>following sentence from the Data.Array.IArray.array documentation:
If any
| >>>two associations in the list have the same index, the value at that
index
| >>>is undefined.
| >>>
| >>>Could this be fixed?
| >>>
| >>>
| >
| >
| >
| >>[...]
| >>
| >>
| >
| >
| >
| >>We don't intend to fix this because fixing it will have a
significant
| >>overhead on every array construction.
| >>
| >>
| >
| >Sorry, but I don't see where the overhead should come from.
| >
| >
| >
| >>[...]
| >>
| >>
| >
| >
| >
| >>Simon
| >>
| >>
| >
| >Wolfgang
| >
| >_______________________________________________
| >Haskell mailing list
| >Haskell at haskell.org
| >http://www.haskell.org/mailman/listinfo/haskell
| >
| >
| 
| 
| --
| ==================================================
| | Iavor S. Diatchki, Ph.D. student               |
| | Department of Computer Science and Engineering |
| | School of OGI at OHSU                          |
| | http://www.cse.ogi.edu/~diatchki               |
| ==================================================
| 
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell


More information about the Haskell mailing list