I would recommend Ralf Hinze's ICFP00 Pearl
Deriving Backtracking Monad Transformers
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.4164
He starts with a monad transformer expressed as a free term algebra,
and shows step-by-step how to transform it to a more efficient
You'll probably get answers from people who are more proficient with this,
but here's what I learned over the years.
Tim Baumgartner wrote:
> Is Cont free as well?
No. In fact, free monads are quite a special case, many monads are not free,
e.g. the list monad. I believe what David Menendez sai
2011/11/21 David Menendez
>
> Here's how you might implement your monad using Cont,
>
> type InteractionM a b = Cont (Interaction a b)
>
> exit b = Cont $ \k -> Exit b
> output b = Cont $ \k -> Output b (k ())
> input= Cont $ \k -> Input k
> runM m = runCont m Exit
>
That's what I origin
On Mon, Nov 21, 2011 at 2:13 PM, Tim Baumgartner
wrote:
> Free Monads. It's amazing to be confronted again with notions I learned more
> than ten years ago for groups. I have to admit that I'm probably not yet
> prepared for a deeper understanding of this, but hopefully I will return to
> it later
Hi Heinrich,
I read your article about the operational monad and found it really very
enlightening. So I'm curious to work through the material you linked below.
Thanks!
Regards
Tim
2011/11/21 Heinrich Apfelmus
> Tim Baumgartner wrote:
>
>> Thanks a lot! Althaugh I have some understanding of
Free Monads. It's amazing to be confronted again with notions I learned
more than ten years ago for groups. I have to admit that I'm probably not
yet prepared for a deeper understanding of this, but hopefully I will
return to it later ;-)
Is Cont free as well? I guess so because I heard it's someti
On 21 November 2011 14:48, Yves Parès wrote:
> I've read Martin Erwig and Steve Kollmansberger's Probabilistic functional
> programming in Haskell.
> Does someone know if the library they are talking about is available on
> hackage?
Henning Thielemann has a "batteries included" version on Hackage
I've read Martin Erwig and Steve Kollmansberger's *Probabilistic functional
programming in Haskell*.
Does someone know if the library they are talking about is available on
hackage?
2011/11/21 Heinrich Apfelmus
> Tim Baumgartner wrote:
>
>> Thanks a lot! Althaugh I have some understanding of the
Tim Baumgartner wrote:
Thanks a lot! Althaugh I have some understanding of the Haskell basics and
the most important monads, I feel that I have to see more well designed
code in order to become a good Haskeller. Can somebody make suggestions
what materials are best to work through in order to ach
On Sat, Nov 19, 2011 at 3:29 PM, Felipe Almeida Lessa
wrote:
> On Sat, Nov 19, 2011 at 6:08 PM, Tim Baumgartner
> wrote:
>> I have not yet gained a good understanding of the continuation monad, but I
>> wonder if it could be used here. What would a clean solution look like?
>> Perhaps there are o
Thanks a lot! Althaugh I have some understanding of the Haskell basics and
the most important monads, I feel that I have to see more well designed
code in order to become a good Haskeller. Can somebody make suggestions
what materials are best to work through in order to achieve this? Are there
easy
On Sat, Nov 19, 2011 at 6:08 PM, Tim Baumgartner
wrote:
> I have not yet gained a good understanding of the continuation monad, but I
> wonder if it could be used here. What would a clean solution look like?
> Perhaps there are other things that need to be changed as well?
Your 'Interaction' data
Hi all,
I wrote a simple interpreter that can be run in the console:
data Interaction a b = Exit b
| Output b (Interaction a b)
| Input (a -> Interaction a b)
runConsole :: Interaction String String -> IO ()
runConsole (Exit b) =
putStrLn $ "Finished
13 matches
Mail list logo