[Haskell-cafe] Building a monoid, continuation-passing style

2009-09-14 Thread Martijn van Steenbergen
Hello cafe, Inspired by Sean Leather's xformat package [1] I built a datatype with which you can build a monoid with holes, yielding a function type to fill in these holes, continuation-passing style. Here are some primitives and their types: now :: m -> ContSt m r r later :: (a -> m) ->

Re: [Haskell-cafe] Building a monoid, continuation-passing style

2009-09-15 Thread David Menendez
On Mon, Sep 14, 2009 at 11:25 AM, Martijn van Steenbergen wrote: > Inspired by Sean Leather's xformat package [1] I built a datatype with which > you can build a monoid with holes, yielding a function type to fill in these > holes, continuation-passing style. Neat! > I have a couple of questions

Re: [Haskell-cafe] Building a monoid, continuation-passing style

2009-09-15 Thread Derek Elkins
On Mon, Sep 14, 2009 at 10:25 AM, Martijn van Steenbergen wrote: > Hello cafe, > > Inspired by Sean Leather's xformat package [1] I built a datatype with which > you can build a monoid with holes, yielding a function type to fill in these > holes, continuation-passing style. Here are some primitiv

Re: [Haskell-cafe] Building a monoid, continuation-passing style

2009-09-16 Thread Martijn van Steenbergen
David Menendez wrote: I'm reminded of the parameterized monad of continuations that Oleg mentioned a few years back. This is all very interesting, thank you both for the pointers! I was trying to get rid of the newtypes but

Re: [Haskell-cafe] Building a monoid, continuation-passing style

2009-09-16 Thread Edward Kmett
For reference Oleg's indexed continuation monad is packaged on hackage in category-extras as: http://hackage.haskell.org/packages/archive/category-extras/latest/doc/html/Control-Monad-Indexed-Cont.html -Edward Kmett On Wed, Sep 16, 2009 at 7:07 AM, Martijn van Steenbergen < mart...@van.steenbergen