Re: [Haskell-cafe] Search monad

2007-03-20 Thread Tomasz Zielonka
On Mon, Mar 19, 2007 at 05:11:19PM +, Edsko de Vries wrote: What I'm wondering about is if this monad is an instance of a more general monad(if so, which one?), and generally if people have any comments about these definitions. It's like the Writer monad used with different monoids.

[Haskell-cafe] Search monad

2007-03-19 Thread Edsko de Vries
Hey, I have a structure containing Xs in various places, like so data X data Structure = Structure .. [X] .. [X] .. And I defined mapStructure mapStructure :: (X - X) - (Structure - Structure) I then wanted to use mapStructure to define queries as well as transformations on structures. I

Re: [Haskell-cafe] Search monad

2007-03-19 Thread Jeff Polakow
Hello, You might want to look at the scrap your boilerplate papers and/or their implementation in GHC in Data.Generics. -Jeff [EMAIL PROTECTED] wrote on 03/19/2007 01:11:19 PM: Hey, I have a structure containing Xs in various places, like so data X data Structure = Structure .. [X]