Felipe Lessa wrote:
Ryan Ingram wrote:
[snip]
data Prompt (p :: * - *) :: (* - *) where
PromptDone :: result - Prompt p result
-- a is the type needed to continue the computation
Prompt :: p a - (a - Prompt p result) - Prompt p result
[snip]
runPromptM :: Monad m = (forall a. p a
On Jan 4, 2008 9:59 AM, apfelmus [EMAIL PROTECTED] wrote:
Felipe Lessa wrote:
How can we prove that (runPromptM prompt === id)? I was trying to go with
You probably mean
runPromptM id = id
Actually, I meant an specialization of 'runPromptM prompt':
runPromptM id :: (Monad p) =
Derek Elkins wrote:
Ryan Ingram wrote:
apfelmus wrote:
A context passing implementation (yielding the ContT monad
transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad that has the
left recursion on = takes quadratic time problem,
On Sat, 2007-11-24 at 11:10 +0100, apfelmus wrote:
Derek Elkins wrote:
Ryan Ingram wrote:
apfelmus wrote:
A context passing implementation (yielding the ContT monad
transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad
On 11/22/07, apfelmus [EMAIL PROTECTED] wrote:
A context passing implementation (yielding the ContT monad transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad that has the left
recursion on = takes quadratic time problem, and represent all primitive
On Fri, 2007-11-23 at 21:11 -0800, Ryan Ingram wrote:
On 11/22/07, apfelmus [EMAIL PROTECTED] wrote:
A context passing implementation (yielding the ContT monad
transformer)
will remedy this.
Wait, are you saying that if you apply ContT to any monad that has the
Ryan Ingram wrote:
I've been trying to implement a few rules-driven board/card games in Haskell
and I always run into the ugly problem of how do I get user input?
The usual technique is to embed the game in the IO Monad:
The problem with this approach is that now arbitrary IO computations are
On 11/21/07, apfelmus [EMAIL PROTECTED] wrote:
A slightly different point of view is that you use a term implementation
for your monad, at least for the interesting primitive effects
That's a really interesting point of view, which had struck me slightly, but
putting it quite clearly like