Phil,
Are there any tools for beginning programmers that give traces of
Haskell programs? I want something like the following. Given the
defintion
sum [] = 0
sum (x:xs) = x + sum xs
typing
sum [1,2,3]
should yield this trace
sum [1,2,3]
1 + sum [2,3]
1 + 2 + sum [3]
Dear Haskell implementors,
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
(1) (\ x - (if p x then foo (g x) else foo (h x))
where
p ... g ... h ... foo ...
)
(2) (\ x - foo ((if p x then g x else h x)
Serge,
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
(1) (\ x - (if p x then foo (g x) else foo (h x))
where
p ... g ... h ... foo ...
)
(2) (\ x - foo ((if p x then g x else h x)
where
On Mon, 11 Oct 2004, Serge D. Mechveliani wrote:
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
Not at all. If foo is non-strict and p partial, (2) may yield a result
where (1) would not. You identify the possibility yourself: (2) is lazier.
(1) (\ x
Dear Haskell implementors,
Consider the compilation flag -allow-extension-for-bottom
which changes the language meaning so that allows to ignore
the bottom value. For example, the programs
(1) (\ x - (if p x then foo (g x) else foo (h x)) )
and
(2) (\ x - foo ((if p x then g x
Dear Haskell implementors,
Consider the compilation flag -allow-extension-for-bottom
which changes the language meaning so that allows to ignore
the bottom value. For example, the programs
(1) (\ x - (if p x then foo (g x) else foo (h x)) )
and
(2) (\ x - foo ((if p x
[ The registration page for TFP04 is now open: registration deadline is Nov 1;
Deadline for paper submissions is Nov 15th.
Apologies for repeated copies of this message -- HWL ]
CALL FOR PAPERS
TFP 2004
Are there any tools for beginning programmers that give traces of
Haskell programs? I want something like the following. Given the
defintion
sum [] = 0
sum (x:xs) = x + sum xs
typing
sum [1,2,3]
should yield this trace
sum [1,2,3]
1 + sum [2,3]
On 08 October 2004 19:18, Sven Panne wrote:
Jules Bean wrote:
[...] Unfortunately, it's not going to work. It's not going to work
because some of the procedures take callbacks, and the callbacks are
values of type IO (). I can see two solutions to this:
a) revert to using an IORef [...]
Dear Haskellers,
another six months have passed, and another change of editor has
occurred. Half a year usually also is plenty of time for several
productive changes and news to occur within the Haskell community,
and therefore it is time for you to start writing: please
contribute to the
On 08 October 2004 14:31, Shae Matijs Erisson wrote:
Frank Atanassow [EMAIL PROTECTED] writes:
In other words, if you press control-C during startup you get this
error message. Not unreasonable, but I suppose if it is easy to
check for such an interrupt it is better not to issue an error
Hi!
On Mon, Oct 11, 2004 at 02:19:45PM +0400, Serge D. Mechveliani wrote:
Dear Haskell implementors,
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
(1) (\ x - (if p x then foo (g x) else foo (h x))
where
p ... g
On 10 October 2004 02:01, Peter Simons wrote:
in a module I am writing, I am using a 'StateT st IO' monad
with a state like this:
data MyState st = ST !Int !st
My own monad is yet-another wrapper for ... another state
monad. And that's getting inconvenient.
So I wondered whether it
Can you give a small program that runs 1000x faster in one form compared
with the other?
Currently, if foo is strict, GHC transforms (2) into (1), not the other
way round. In general, transforming (1) into (2) looks hard, because it
means finding the common portions of two expressions. But I'd
First, thanks to the people who correct me about `equivalence',
(I skip the name because the letter was addressed privately).
Because we do not mean to compile each program to the equivalent
one of
error bottom
On Mon, Oct 11, 2004 at 12:44:49PM +0100, Simon Peyton-Jones wrote:
Can you
On Mon, Oct 11, 2004 at 04:32:08PM +0400, Serge D. Mechveliani wrote:
First, thanks to the people who correct me about `equivalence',
(I skip the name because the letter was addressed privately).
Because we do not mean to compile each program to the equivalent
one of
error bottom
Ah I see. You get earlier results, but the overall computation is
unchanged.
Hmm. I can't say I'm persuaded. The transformation is unsound in
general and, because it makes programs lazier, it'll slow programs down
a bit; in exchange there's the possibility of earlier output (which may
or may
I cvs-updated my copy moments ago, but I still get this
error when compiling my ADNS.hsc bindings with the new
version:
/tmp/ghc12865.hc: In function `s8Ej_ret':
/tmp/ghc12865.hc:6355: error: `ADNS_d7gS' undeclared (first use in this function)
/tmp/ghc12865.hc:6355: error: (Each undeclared
Hi,
If I have two modules which are mutually recursive;
module A where
data TA = TA String deriving (Data, Typeable)
module B where
data TB = TB TA deriving (Data, Typeable)
How do I got about writing a hi-boot that will work in GHC? The problem
is that to do proper XML Schema
On Mon, Oct 11, 2004 at 04:35:30PM +0100, Simon Peyton-Jones wrote:
Ah I see. You get earlier results, but the overall computation is
unchanged.
Hmm. I can't say I'm persuaded. The transformation is unsound in
general and, because it makes programs lazier, it'll slow programs down
a
Dear Haskell implementors,
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
(1) (\ x - (if p x then foo (g x) else foo (h x))
where
p ... g ... h ... foo ...
)
(2) (\ x - foo ((if p x then g x else h x)
Dear Haskell implementors,
Consider the compilation flag -allow-extension-for-bottom
which changes the language meaning so that allows to ignore
the bottom value. For example, the programs
(1) (\ x - (if p x then foo (g x) else foo (h x)) )
and
(2) (\ x - foo ((if p x then g x
Serge,
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
(1) (\ x - (if p x then foo (g x) else foo (h x))
where
p ... g ... h ... foo ...
)
(2) (\ x - foo ((if p x then g x else h x)
where
On Mon, 11 Oct 2004, Serge D. Mechveliani wrote:
How do you think, is the program (1) equivalent to (2)
in the meaning of Haskell-98 ?
Not at all. If foo is non-strict and p partial, (2) may yield a result
where (1) would not. You identify the possibility yourself: (2) is lazier.
(1) (\ x
This would also benefit string processing... Imagine:
test = ++
This could be implented as two list cells, one for each string, anf
the cost of the ++ becomes the same as the cost of :
No, you still have to copy so you can change the tail pointer -
but at least it's a
It is, of course, trivial to implement this for lists. I've run into
a snag, however, when trying to implement this for Arrays (as in
Data.Array) - I can't seem to find a way to represent an empty array,
which makes implementing 'empty' and 'null' impossible. Suggestions?
Empty arrays can
No, you still have to copy so you can change the tail pointer
Do you? If is treated as a single buffer contents (IE implemented
as a UArray Int Char for example) then as our 'new' list implementation#
can have cells which are single elements of buffers of elements, we
simply 'cons' the
karczma [EMAIL PROTECTED] writes:
I think the Haskell community has just been a bit slower in understanding
the importance of strictness :)
OK, I admit that I will never understand these complaints about the
inefficiency of non-strict computations, since what I *require* in most
of my
Jerzy Karczmarczuk writes (in the Haskell cafe):
OK, I admit that I will never understand these complaints about the
inefficiency of non-strict computations, since what I *require* in most
of my work is laziness. Had I needed strictness for the sake of efficiency,
I would use a different language
Peter Simons [EMAIL PROTECTED] writes:
http://cryp.to/blockio/docs/tutorial.html
Pretty neat. Wouldn't it be a nice addition to the
Tutorials section on the Haskell Bookshelf?
Note: as I gather, GHC's lists are not doubly linked.
--
Feri.
___
At 10:47 08/10/04 +0100, Malcolm Wallace wrote:
John Goerzen [EMAIL PROTECTED] writes:
My initial thought was to use the cpp-style ifdefs I've seen elsewhere
to mask those unsupported features on those particular systems. But
Hugs at least doesn't support that, and I've found it extremely
n Mon, Oct 11, 2004 at 12:22:13PM +0100, Malcolm Wallace wrote:
karczma [EMAIL PROTECTED] writes:
I think the Haskell community has just been a bit slower in understanding
the importance of strictness :)
OK, I admit that I will never understand these complaints about the
On Mon, 11 Oct 2004 14:16:36 -0700, John Meacham [EMAIL PROTECTED] wrote:
n Mon, Oct 11, 2004 at 12:22:13PM +0100, Malcolm Wallace wrote:
So is it fair to compare the default lazy Haskell solution with all
the eager solutions out there that laboriously do all this unnecessary
work?
Malcolm Wallace wrote:
For instance, the shootout often requires that a task be carried out N
times, to make the timings large enough to measure. In all the naive
Haskell implementations of these tasks, Haskell wins by a mile. Why?
Because the language quite reasonably says that if you
On 2004 October 09 Saturday 15:33, William Lee Irwin III wrote:
So, I discovered that simple continued fractions are supposed to be
spiffy lazy lists and thought I'd bang out some continued fraction code.
But then I discovered ContFrac.hs and couldn't really better it. Of
course, I went about
On Mon, Oct 11, 2004 at 09:53:16PM -0400, Scott Turner wrote:
I tried using continued fractions in a spiffy lazy list implementation a
while ago. Never got them working as well as expected.
Evenutally I realized that calculating with lazy lists is not as
smooth as you might expect.
For
36 matches
Mail list logo