On 10/19/07, Yitzchak Gale <[EMAIL PROTECTED]> wrote:
> So why not make the laziness available
> also for cases where "1 - 2 == 0" does _not_ do
> the right thing?
>
> data LazyInteger = IntZero | IntSum Bool Integer LazyInteger
>
> or
>
> data LazyInteger = LazyInteger Bool Nat
I think
data
Coincidentally, I just sent a patch to John for this very issue. I've
attached it here, it simply updates the setup script and cabal file
for Cabal 1.2.
Thanks,
Greg Heartsfield
On Thu, Oct 18, 2007 at 09:31:51AM -0500, John Goerzen wrote:
> On 2007-10-17, Chris Hayden <[EMAIL PROTECTED]> wrote:
On 10/20/07, Mads Lindstrøm <[EMAIL PROTECTED]> wrote:
> I am not a monad-expect, so I may be wrong, but wouldn't a writer monad
> be more appropriate?
You are at least more monad-expert than myself . I knew the existence
of the writer monad but not really how it works. After checking its
documen
good news indeed!
On 10/20/07, Duncan Coutts <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2007-10-19 at 09:41 -0700, Conal Elliott wrote:
> > Will hackage docs use haddock 2.0 any time soon, for libraries that
> > use language extensions not supported by the older haddock?
>
> David Waern told me today
Stefan O'Rear wrote:
On Sat, Oct 20, 2007 at 08:05:37PM +0100, Andrew Coppin wrote:
I want to construct a program that prints out something like this:
[\fx -> f(fx)]
[\f -> [\x -> f(fx)]]
[\f -> S[\x -> f][\x -> fx]]
[\f -> S(Kf)[\x -> fx]]
[\f -> S(Kf)f]
S[\f -> S(Kf)][\f -> f]
S(S[\f -> S]
On Sat, Oct 20, 2007 at 08:05:37PM +0100, Andrew Coppin wrote:
> Brent Yorgey wrote:
>>
>> Hmm... I'm having trouble understanding exactly what you want. In
>> particular, I don't understand what this statement:
>>
>> "But what I *really* want is to print out the transformation *sequence*."
>>
>>
On Oct 20, 2007, at 15:05 , Andrew Coppin wrote:
I can quite happily construct a program which, given the first
line, yields the last line. But getting it to print all the
intermediate steps is harder. And, like I said, when something is
"hard" in Haskell, it usually means you're doing it
Brent Yorgey wrote:
Hmm... I'm having trouble understanding exactly what you want. In
particular, I don't understand what this statement:
"But what I *really* want is to print out the transformation *sequence*."
has to do with the pseudocode that you exhibit later. Could you
perhaps clari
Twan van Laarhoven wrote:
How about:
transform ... =
(transform sub1 >>= put back into main expression)
++ (transform sub2 >>= put back into main expression)
Or something to that effect? Or maybe
transform ... = do
sub' <- transform sub1 ++ transform sub2
put
On 10/20/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
>
> I'm writing some code where I take an expression tree and transform it
> into another equivilent one.
>
> Now it's moderately easy to write the code that does the transformation.
> But what I *really* want is to print out the transformation
Hi Alfonso & Andrew
Alfonso Acosta wrote:
> How about using a state monad as a logger?
I am not a monad-expect, so I may be wrong, but wouldn't a writer monad
be more appropriate? After all, it is just used for logging the
intermediate results, not to keep read/write state. In other words, we
jus
Andrew Coppin wrote:
I'm writing some code where I take an expression tree and transform it
into another equivilent one.
Now it's moderately easy to write the code that does the transformation.
But what I *really* want is to print out the transformation *sequence*.
This appears to be much mor
Alfonso Acosta wrote:
How about using a state monad as a logger?
You store the transformation sequence in the state while processing
the tree, then you simply retrieve the state and print it out.
Mmm... that could work... I'll investigate.
Thanks.
_
How about using a state monad as a logger?
You store the transformation sequence in the state while processing
the tree, then you simply retrieve the state and print it out.
Your transformation function should change to
> import Control.Monad.State
>
> data Log = ... -- to be defined
>
> type Lo
I'm writing some code where I take an expression tree and transform it
into another equivilent one.
Now it's moderately easy to write the code that does the transformation.
But what I *really* want is to print out the transformation *sequence*.
This appears to be much more awkward.
What I ha
Hi!
Suppose that the GHC's flag -fallow-incoherent-instances is enabled. In this
situation, when a instance will be rejected?
And if the flag -fallow-overlapping-instances is enabled. When a instance
will be rejected?
Thanks!
Rodrigo
___
Haskell-Cafe m
On Fri, 2007-10-19 at 09:41 -0700, Conal Elliott wrote:
> Will hackage docs use haddock 2.0 any time soon, for libraries that
> use language extensions not supported by the older haddock?
David Waern told me today that he's working on a new patch to integrate
haddock-2.0 support into Cabal. So whe
Mads,
Many thanks for your help. i really appreciate it.
Best wishes,
--greg
On 10/19/07, Mads Lindstrøm <[EMAIL PROTECTED]> wrote:
>
> Hi Greg
>
> I forgot to say, that I did not stop using the Shelarcy patch because
> there was something wrong with the code. On the contrary it served me
> wel
On Fri, Oct 19, 2007 at 07:59:37PM +0200, Mads Lindstrøm wrote:
>
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/syb-with-class-0.3
> (hereafter know as HappS-SYB3). HappS-SYB3 is based on the SYB3 code
> you mention, but the code has been changed quite a bit compared to
> using the
Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
> I realise belatedly that my message might have sounded
> dismissive. My apologies; it wasn't intended to be. Good
> ideas are just that: good. Reinventing them is a sign of
> good taste.
>
> As to documenting GHC, we try to do that by writing pap
20 matches
Mail list logo