Re: [Haskell-cafe] Variable-arity zipWith (re)invented.

2012-12-10 Thread Takayuki Muranushi
Repeated thanks to you, Adam! Your code is brilliantly simple. Sadly, I cannot reproduce the behaviors in your comments on my ghci (7.6.1) . Can we guess why? The version of packages we are using? Mines are here. https://github.com/nushio3/practice/tree/master/variable-arity/adam >>> :t

Re: [Haskell-cafe] Variable-arity zipWith (re)invented.

2012-12-10 Thread adam vogt
On Sat, Dec 8, 2012 at 10:27 AM, Takayuki Muranushi wrote: > Continued discussion from > > https://groups.google.com/d/topic/haskell-cafe/-e-xaCEbd-w/discussion > https://groups.google.com/d/topic/haskell-cafe/kM_-NvXAcx8/discussion > > Thank you for all the answeres and thinkings; > > > Here's zi

Re: [Haskell-cafe] mtl: Why there is "Monoid w" constraint in the definition of class MonadWriter?

2012-12-10 Thread Chris Wong
Hi Petr, On Sun, Dec 9, 2012 at 7:59 AM, Petr P wrote: > > The class is defined as > > > class (Monoid w, Monad m) => MonadWriter w m | m -> w where > > ... > > What is the reason for the Monoid constrait? It seems superfluous to me. I > recompiled the whole package without it, with no problems

[Haskell-cafe] ANNOUNCE: tie-knot library

2012-12-10 Thread Petr P
Dear Haskellers, I'd like to announce a small library "tie-knot": "Ties the knot" on a given set of structures that reference each other by keys - replaces the keys with their respective values. Takes Map k (v k) and converts into Map k v' where v' is the fixed point of v. Motivation: I ne

Re: [Haskell-cafe] mtl: Why there is "Monoid w" constraint in the definition of class MonadWriter?

2012-12-10 Thread Andreas Abel
I guess you have a point here: 1. The definition of the MonadWriter operations does not need the Monoid operations. Hence, the class constraint Monoid w should be removed. 2. The formulation of the MonadWriter laws (which are sadly missing from the documentation) would need the Monoid oper

Re: [Haskell-cafe] Observer pattern in haskell FRP

2012-12-10 Thread Ertugrul Söylemez
Nathan Hüsken wrote: > I put a pseudo C++ example below the mail. I use the terms "model" and > "view" for the game logic and rendering respectively. > The example is a little different. Asteroids explode when they > collide. The moment asteroids explode, they are removed from the model > (the ga

Re: [Haskell-cafe] Observer pattern in haskell FRP

2012-12-10 Thread Nathan Hüsken
On 12/08/2012 10:32 AM, Heinrich Apfelmus wrote: > Nathan Hüsken wrote: >> Heinrich Apfelmus wrote: >>> >>> In that light, the separation seems straightforward to me. Given the >>> time-varying values that represent game objects, >>> >>>bSpaceShipPosition :: Behavior Position >>>bAsteroidPo

Re: [Haskell-cafe] cabal configure && cabal build && cabal install

2012-12-10 Thread Aleksandar Dimitrov
On Mon, Nov 26, 2012 at 06:21:33PM -0500, Albert Y. C. Lai wrote: > "cabal configure" is used by a lot of programmers. Today. Why? > > Because they use it on their own projects. They use cabal-install as > a builder, not exactly an installer. Don't most devs nowadays use sandboxing, a.k.a. cabal-