RE: [Haskell-cafe] Re: [Haskell] Re: Global Variables and IOinitializers

2004-11-30 Thread Ian . Stark
On Mon, 29 Nov 2004, Simon Peyton-Jones wrote: This unfortunate observabilty of an ordering (or hash value) that is needed only for efficient finite maps, is very annoying. I wish I knew a way round it. As it is we can pick a) expose Ord/Hash, but have unpredictable results b) not

Re: [Haskell-cafe] Re: [Haskell] Re: Global Variables and IOinitializers

2004-11-30 Thread Graham Klyne
At 13:43 29/11/04 -0800, John Meacham wrote: On Mon, Nov 29, 2004 at 03:09:53PM -, Simon Peyton-Jones wrote: > | > In fact GHC at least *already* generates a unique integer for each > | > TypeRep. A good idea, since it means comparisons can be done in unit > | > time. Thus indexing can be done

Re: [Haskell-cafe] Re: [Haskell] Re: Global Variables and IOinitializers

2004-11-29 Thread John Meacham
On Mon, Nov 29, 2004 at 03:09:53PM -, Simon Peyton-Jones wrote: > | > In fact GHC at least *already* generates a unique integer for each > | > TypeRep. A good idea, since it means comparisons can be done in unit > | > time. Thus indexing can be done trivially using this integer as a > | > hash

RE: [Haskell-cafe] Re: [Haskell] Re: Global Variables and IOinitializers

2004-11-29 Thread Simon Peyton-Jones
| > In fact GHC at least *already* generates a unique integer for each | > TypeRep. A good idea, since it means comparisons can be done in unit | > time. Thus indexing can be done trivially using this integer as a | > hash function. | | Yes, I have seen this in the code, too. The Ord and Typeable