Re: [Haskell-cafe] Data.IntMap union complexity

2012-02-24 Thread Christoph Breitkopf
Folding insert might still be a win if one of the maps is very much smaller than the other, but since size is O(n) for Data.IntMap, there's no way to find out if that's the case. - chris On Fri, Feb 24, 2012 at 4:48 AM, wren ng thornton w...@freegeek.org wrote: When the two maps are of vastly

Re: [Haskell-cafe] [haskell-cafe] Some reflections on Haskell

2012-02-16 Thread Christoph Breitkopf
Since people are mentioning how great the Haskell type system is for refactoring, here's one of those wow, that's really great experiences I just had hacking on some Java code in Eclipse. I wanted to remove duplicate code, so I selected one of the duplications and used Refactor-Extract method. To

Re: [Haskell-cafe] Good Java book? (not off-topic)

2012-02-16 Thread Christoph Breitkopf
How about recommending a Scala book instead of Java? That would teach a functional mindset, and on stepping back to Java, they'd just have a different syntax for types, and some missing stuff. On the Java side, I own A Little Java, a Few Patterns by Friedmann and Felleisen. This would certainly

Re: [Haskell-cafe] The State of Testing?

2012-02-09 Thread Christoph Breitkopf
On Thu, Feb 9, 2012 at 6:57 PM, Thomas Tuegel ttue...@gmail.com wrote: You need Cabal 1.12 for '--enable-library-coverage'. The only place it's documented is in 'cabal configure --help' (a major oversight on my part). The online docs for Cabal are only from version 1.10 anyway, so that

Re: [Haskell-cafe] The State of Testing?

2012-02-08 Thread Christoph Breitkopf
Hello Thomas, On Wed, Feb 8, 2012 at 4:03 AM, Thomas Tuegel ttue...@gmail.com wrote: First, as author of the test suite code, let me apologize for the terrible documentation. This is absolutely NOT how coverage reports are supposed to work. If you configure with '--enable-tests

Re: [Haskell-cafe] where to put general-purpose utility functions

2012-01-21 Thread Christoph Breitkopf
One thing I found useful when looking if a function already exists under a different name is to use Hayoo to search for the type, i.e.: http://holumbus.fh-wedel.de/hayoo/hayoo.html#0:(a%20-%3E%20Bool)%20-%3E%20%5Ba%5D%20-%3E%20(%5Ba%5D%2C%5Ba%5D) - Chris

Re: [Haskell-cafe] where to put general-purpose utility functions

2012-01-21 Thread Christoph Breitkopf
On Sat, Jan 21, 2012 at 11:08 PM, Christoph Breitkopf chbreitk...@googlemail.com wrote: One thing I found useful when looking if a function already exists under a different name is to use Hayoo to search for the type, i.e.: Uh - please ignore the bogus link - I had blindly assumed

Re: [Haskell-cafe] Simple type-class experiment turns out not so simple...

2012-01-08 Thread Christoph Breitkopf
On Sun, Jan 8, 2012 at 9:25 PM, Brent Yorgey byor...@seas.upenn.edu wrote: On Fri, Jan 06, 2012 at 10:51:58AM +, Steve Horne wrote: If I specify both extensions (-XMultiParamTypeClasses and -XFlexibleInstances) it seems to work, but needing two language extensions is a pretty strong

[Haskell-cafe] Motivation for having indexed access in Data.Map?

2012-01-07 Thread Christoph Breitkopf
Hello, I wonder why Data.Map provides the indexed access functions: http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Map.html#g:21 These functions seem rather out-of-place to me in the map api. The only use case I could think of so far would be to find the median, or

[Haskell-cafe] (no subject)

2012-01-05 Thread Christoph Breitkopf
Hello, I'm trying to figure out how to handle versioning of my IntervalMap package. I've just read the package versioning policy: http://www.haskell.org/haskellwiki/Package_versioning_policy I don't quite understand all the recommendations in the above document, though: a) You are not allowed

Re: [Haskell-cafe] Package Versioning Policy

2012-01-05 Thread Christoph Breitkopf
Forgot the header, sorry. On Thu, Jan 5, 2012 at 5:54 PM, Christoph Breitkopf chbreitk...@googlemail.com wrote: Hello, I'm trying to figure out how to handle versioning of my IntervalMap package. I've just read the package versioning policy: http://www.haskell.org/haskellwiki

Re: [Haskell-cafe] Package Versioning Policy

2012-01-05 Thread Christoph Breitkopf
HI, On Thu, Jan 5, 2012 at 6:15 PM, Johan Tibell johan.tib...@gmail.com wrote: c) You are not allowed to add new instances. I don't get this - how is this any worse than b)? You cannot prevent the import of new instances. When you import a module you get all its instances. This means that

Re: [Haskell-cafe] Package Versioning Policy

2012-01-05 Thread Christoph Breitkopf
Am 05.01.2012 20:08 schrieb Johan Tibell johan.tib...@gmail.com: - Mayor Version changes: as described in the guidelines: changed interface, new instances - Minor version change: when I just add functions - Patchlevel change: for bugfixes, performance fixes, documentation changes Yes.

Re: [Haskell-cafe] Package Versioning Policy

2012-01-05 Thread Christoph Breitkopf
Am 05.01.2012 19:14 schrieb Brandon Allbery allber...@gmail.com: What I don't get is how a new instance may break existing code. Any example? It's not unusual for people to define their own instances for things; if a new release of the library then adds its own version of those instances, even

[Haskell-cafe] Module name space question

2011-12-12 Thread Christoph Breitkopf
Hi, I recently asked about what interfaces to implement for a new data type. Following the rule that the last 10% of work take the second 90% of time, some other questions have come up. If anyone wants to look at the code in question: http://www.chr-breitkopf.de/comp/IntervalMap Some time ago,

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

2011-12-09 Thread Christoph Breitkopf
, 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

[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 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 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] Hackage down!

2011-12-01 Thread Christoph Breitkopf
Yep, same here. - Chris ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe