Re: [Haskell-cafe] Recommended class instances for container type

2011-12-11 Thread wren ng thornton
On 12/8/11 11:12 AM, Christoph Breitkopf wrote: Hello, I'm in the process of implementing a container data type, and wonder what class instances are generally considered necessary. E.g. is it ok to start out with a Show that's adequate for debugging, or is it a 'must' to include instances of

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-09 Thread Christoph Breitkopf
It's just a variant of Data.Map that takes intervals as keys and offers an efficient stabbing query. I'm reasonably optimistic on the performance front. Will probably release a 0.1 soon. Thanks again for all opinions, Chris Am 08.12.2011 20:41 schrieb Johan Tibell johan.tib...@gmail.com: On

[Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Christoph Breitkopf
Hello, I'm in the process of implementing a container data type, and wonder what class instances are generally considered necessary. E.g. is it ok to start out with a Show that's adequate for debugging, or is it a 'must' to include instances of everything possible (Eq, Ord if possible, Read,

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Edward Z. Yang
I'd hazard that if you went 'containers' and looked at what instances were implemented, that would give you a good idea. :^) (For example, if you look at Data.MAp, it has NFData, Typeable2 and Data instances.) Edward Excerpts from Christoph Breitkopf's message of Thu Dec 08 11:12:06 -0500 2011:

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Christoph Breitkopf
That's what I did, and the reason for my question. 'Cause I was scared off by looking at Data.Map (CPP, lots of language extensions). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Bryan O'Sullivan
On Thu, Dec 8, 2011 at 8:12 AM, Christoph Breitkopf chbreitk...@googlemail.com wrote: I'm in the process of implementing a container data type, and wonder what class instances are generally considered necessary. E.g. is it ok to start out with a Show that's adequate for debugging, or is it a

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Christoph Breitkopf
Hello Bryan, On Thu, Dec 8, 2011 at 6:03 PM, Bryan O'Sullivan b...@serpentine.com wrote: And what about the more experimental things? Say, DeepSeq, Typeable, Data? None of those are experimental. They're all frequently used in production code. DeepSeq is far more important than the other

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Daniel Fischer
On Thursday 08 December 2011, 18:13:50, Christoph Breitkopf wrote: Well, including a some file via CPP did look experimental enough to me. I'd like to stay away from GHC-only code, if possible. CPP is standard (maybe not in the sense that it's included in the language standard, but every

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Johan Tibell
On Thu, Dec 8, 2011 at 8:12 AM, Christoph Breitkopf chbreitk...@googlemail.com wrote: Hello, I'm in the process of implementing a container data type, and wonder what class instances are generally considered necessary. E.g. is it ok to start out with a Show that's adequate for debugging, or