[Haskell-cafe] library for drawing charts

2008-05-24 Thread Peter Gammie
Hello, Has anyone got some code for drawing charts? I don't mean graphs of functions, ala http://dockerz.net/twd/HaskellCharts and I don't mean calls to the Google Charts API ala http://community.livejournal.com/evan_tech/241080.html I would like something that can generate PNGs in memory,

Re: [Haskell-cafe] strange cabal error

2008-05-24 Thread Duncan Coutts
On Fri, 2008-05-23 at 15:07 -0500, John Lato wrote: Hello, I recently ran into a strange cabal error. When trying to configure a package (leksah 0.1.1) I get the following error: MacBook-Pro:leksah-0.1.1 jwl$ runhaskell Setup.lhs configure Configuring leksah-0.1.1... Setup.lhs: ghc

Re: Re[2]: [Haskell-cafe] Newbie: State monad example questions

2008-05-24 Thread Olivier Boudry
On Sat, May 24, 2008 at 3:39 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Olivier, Saturday, May 24, 2008, 5:37:32 AM, you wrote: (|) = flip (.) I even started to use it in my code and then stopped. It may be a stupid concern but as many optimizations performed by GHC are made

Re: [Haskell-cafe] library for drawing charts

2008-05-24 Thread Olivier Boudry
On Sat, May 24, 2008 at 5:33 AM, Peter Gammie [EMAIL PROTECTED] wrote: Hello, Has anyone got some code for drawing charts? Look at this: http://byorgey.wordpress.com/2008/04/30/new-haskell-diagrams-library/ I'm not sure it's what you're looking for but it could probably be used as a base

Re: [Haskell-cafe] newbie: maintaining relationships

2008-05-24 Thread Neil Mitchell
Hi Give the following code below, my question is - how do i setup a dependency of User on Common? Perhaps a first attempt should not have Common store a reference to User, nor User store a reference to Common. Instead, have two Data.Map.Map's: one looks up from Common to User, one from User

Re: [Haskell-cafe] newbie: maintaining relationships

2008-05-24 Thread Albert Y. C. Lai
Neil Mitchell wrote: Sounds like a bidirectional Map to me - fortunately hackage already has one of these: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bimap Yes, bimap is even better. Save lots of work. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] newbie: maintaining relationships

2008-05-24 Thread Albert Y. C. Lai
geoffrey wrote: Give the following code below, my question is - how do i setup a dependency of User on Common? Perhaps a first attempt should not have Common store a reference to User, nor User store a reference to Common. Instead, have two Data.Map.Map's: one looks up from Common to User,

Re: [Haskell-cafe] Data.Tree.Zipper in the standard libraries

2008-05-24 Thread Iavor Diatchki
Hello, I think that the modified API (no state monad, and using Maybe) is quite nice! I implemented a version of the the suggested API using a slightly different data structure, which makes the code a bit simpler, I think. I put the code in the Haskell wiki: