[Haskell-cafe] Difference between class and instance contexts

2011-08-03 Thread Patrick Browne
Below are examples of using the sub-class context at class level and at instance level. In this simple case they seem to give the same resultsIn general, are there certain situations in which one or the other is preferred? Patmodule CLASS where-- class and sub-classclass Class a where foo :: a - a 

Re: [Haskell-cafe] Difference between class and instance contexts

2011-08-03 Thread Chris Smith
On Aug 3, 2011 1:33 PM, Patrick Browne patrick.bro...@dit.ie wrote: instance Class Integer = SubClass Integer where moo a = foo a Since you've just written the Class instance for Integer, the superclass context is actually irrelevant there. You may as well just write instance SubClass

Re: [Haskell-cafe] Difference between class and instance contexts

2011-08-03 Thread Miguel Mitrofanov
Try :t (foo 2, moo 2) On 3 Aug 2011, at 23:31, Patrick Browne wrote: Below are examples of using the sub-class context at class level and at instance level. In this simple case they seem to give the same results In general, are there certain situations in which one or the other is

[Haskell-cafe] Is there a program to check if a matrix is totally unimodular?

2011-08-03 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] strictness properties of monoidal folds

2011-08-03 Thread Alexey Khudyakov
On 02.08.2011 08:16, Sebastian Fischer wrote: Data.Foldable also provides the monoidal fold function foldMap. It is left unspecified whether the elements are accumulated leftwards, rightwards or in some other way, which is possible because the combining function is required to be associative.

Re: [Haskell-cafe] Fwd: shootout

2011-08-03 Thread Ben Gamari
On Sun, 31 Jul 2011 02:27:07 +0200, Thorsten Hater t...@tp1.rub.de wrote: Non-text part: multipart/mixed Good Evening, can anybody confirm that this implementation is somewhat faster than the current benchmark (at expense of memory consumption)? Cheers, Thorsten Somewhat faster is an

[Haskell-cafe] ANNOUNCE: vector-algorithms 0.5.2

2011-08-03 Thread Dan Doel
Greetings, Following some work at hac-phi, I've finally put together a new release of vector-algorithms. It should now be available via hackage, or you can pull from code.haskell.org if you prefer: hackage: http://hackage.haskell.org/package/vector-algorithms/ latest: darcs get

[Haskell-cafe] Haskell Weekly News: Issue 193

2011-08-03 Thread Daniel Santa Cruz
Welcome to issue 193 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of July 24 to 30, 2011. [1] http://goo.gl/8hDku You can find an HTML rendition of this issue at: