Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Francesco Mazzoli
At Fri, 28 Sep 2012 18:33:23 -0700, Alexander Solla wrote: Only with respect to type inference. I don't understand this comment. I wouldn't have replied with that line of thought if you had just told us what the problem was in the first place. I /was/ saying that you can use explicit type

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Francesco Mazzoli
At Sat, 29 Sep 2012 10:30:07 +0200, Francesco Mazzoli wrote: Then I'd also like to have newtype TST sym algo = ... instance (Ord sym, ListLike full sym) = Search (TST sym algo) full algo This one is a different problem - it requires UndecidableInstances and I don't understand

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread MigMit
Well, it seems that you can't do exactly what you want. So, the simplest way to do this would be not to make Foo a superclass for Bar: class Bar a where foo :: Foo a b = a - b - c Then you would have to mention Foo everywhere. If you really need, for some reason, to ensure that every Bar

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Francesco Mazzoli
At Sat, 29 Sep 2012 13:04:59 +0400, MigMit wrote: Well, it seems that you can't do exactly what you want. So, the simplest way to do this would be not to make Foo a superclass for Bar: class Bar a where foo :: Foo a b = a - b - c Then you would have to mention Foo everywhere. Just to

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Francesco Mazzoli
At Sat, 29 Sep 2012 10:56:29 +0200, Francesco Mazzoli wrote: At Sat, 29 Sep 2012 10:30:07 +0200, Francesco Mazzoli wrote: Then I'd also like to have newtype TST sym algo = ... instance (Ord sym, ListLike full sym) = Search (TST sym algo) full algo This one is a

Re: [Haskell-cafe] Discovery of unnecessary build-depends

2012-09-29 Thread Ozgur Akgun
On 28 September 2012 19:29, Jason Whittle ja...@funnelfire.com wrote: Is there a tool available that will tell me if the cabal file for my library or application has any unnecessary build-depends? FWIW, I felt the need for such a tool many times before too. The same tool can also report

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Gábor Lehel
On Fri, Sep 28, 2012 at 6:36 PM, Francesco Mazzoli f...@mazzo.li wrote: I would expect this to work, maybe with some additional notation (a la ScopedTypeVariables) {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} class Foo a b | a - b class

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread MigMit
On Sep 29, 2012, at 9:49 PM, Gábor Lehel illiss...@gmail.com wrote: On Fri, Sep 28, 2012 at 6:36 PM, Francesco Mazzoli f...@mazzo.li wrote: I would expect this to work, maybe with some additional notation (a la ScopedTypeVariables) {-# LANGUAGE FunctionalDependencies #-} {-#

Re: [Haskell-cafe] Class constraints with free type variables and fundeps

2012-09-29 Thread Francesco Mazzoli
At Sat, 29 Sep 2012 19:49:36 +0200, Gábor Lehel wrote: I was browsing the GHC bug tracker and accidentally might have found a solution to your problem: http://hackage.haskell.org/trac/ghc/ticket/7100 Thanks, this makes me feel better. What interested me is not the workarounds, that I had

[Haskell-cafe] ANNOUNCE: bindings-gobject-0.4

2012-09-29 Thread Yuras Shumovich
Hello, I uploaded new release of bindings-gobject, low level binding to gobject library: http://hackage.haskell.org/package/bindings-gobject-0.4 (I maintain it now) Now it exposes internals of GObject and GObjectClass, so it is possible to create custom GObject subclasses from haskell land.

[Haskell-cafe] One of the new buzz phrases is Event-Sourcing; is Haskell suitable for this?

2012-09-29 Thread KC
http://martinfowler.com/eaaDev/EventSourcing.html http://martinfowler.com/articles/lmax.html -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] If I want to make a pure Haskell eigenvalue, etc. package without calling to LAPACK, etc ...

2012-09-29 Thread KC
What are some good basis (pun intended) to start from? e.g. REPA? or ? -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] One of the new buzz phrases is Event-Sourcing; is Haskell suitable for this?

2012-09-29 Thread Brandon Allbery
On Sat, Sep 29, 2012 at 8:46 PM, KC kc1...@gmail.com wrote: http://martinfowler.com/eaaDev/EventSourcing.html STM? And I believe there's work on the debugger in ghci to run programs backwards. -- brandon s allbery allber...@gmail.com wandering unix

Re: [Haskell-cafe] One of the new buzz phrases is Event-Sourcing; is Haskell suitable for this?

2012-09-29 Thread Alberto G. Corona
It´´s a very iteresting concept. The Workflow Monad transformer [1], in Control.Workflow perform logging and recovery of application istate from the log created. It has no implementation of roll-back or limited recovery upto a point, but this is easy to implement. It also has many inspection and

[Haskell-cafe] Monads

2012-09-29 Thread Vasili I. Galchin
Hello, I would an examples of monads that are pure, i.e. no side-effects. Thank you, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monads

2012-09-29 Thread Kristopher Micinski
You have fallen into the misconception that monads are impure, they are not. Many monad tutorials begin (erroneously) with the lines monads allow you to do impure programming in Haskell. This is false, monads are pure, it's IO that's impure, not the monadic programming style. Monads let you

Re: [Haskell-cafe] Monads

2012-09-29 Thread KC
From: http://www.haskell.org/haskellwiki/Monad The computation doesn't have to be impure and can be pure itself as well. Then monads serve to provide the benefits of separation of concerns, and automatic creation of a computational pipeline. On Sat, Sep 29, 2012 at 6:57 PM, Vasili I. Galchin

Re: [Haskell-cafe] Call for discussion: OverloadedLists extension

2012-09-29 Thread wren ng thornton
On 9/28/12 2:48 PM, Mario Blažević wrote: On 12-09-26 08:07 PM, wren ng thornton wrote: On 9/25/12 1:57 PM, Sjoerd Visscher wrote: Maybe we could make a literal [a,b,c] turn into unpack [a,b,c]# where [a,b,c]# is a statically-allocated vector? I'm kinda surprised this isn't already