let-floating

2001-10-15 Thread Janis Voigtlaender
Hello, I've got a question regarding let-floating [1]. Consider the following two versions of the quicksort algorithm: > qsort1 l = f l [] > where f [] = (\y -> y) > f (x:xs) = let (xs_1,xs_2) = part ( in (\y -> f xs_1 (x:(f xs_2 y))) > qsort2 l = f l []

RE: Harmful spammers

2001-10-15 Thread Simon Marlow
> There are a couple things to do that can at least cut down on spam. > > 1) Make sure that your mail gateway, or (in this case) the mailing >list host is not an open relay site. It isn't. > 2) Every time you get spam, locate all the hosts it came through >in the header. Or alternati

RE: let-floating

2001-10-15 Thread Simon Peyton-Jones
| Is there a compiler (which version?) that optimizes qsort1 to | (essentially) qsort2 ? | | Any hints concerning the possibility/impossibility of this | would be helpful. Thanks and regards, Janis. Alas, (still) not yet. As you say, the transformation depends on spotting a one-shot lambda, a

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Simon Peyton-Jones
Fpr the Revised Haskell 98 report, Russell O'Connor suggests: | Also, I understand you are reluctant to make library changes, | but sinh and cosh can easily be defined in terms of exp | | sinh x = (exp(x) - exp(-x))/2 | cosh x = (exp(x) + exp(-x))/2 | | (source: Calculus Third E

Re: bracket_

2001-10-15 Thread Marcin 'Qrczak' Kowalczyk
Sun, 14 Oct 2001 23:25:40 -0400, Ken Shan <[EMAIL PROTECTED]> pisze: > In Haskell's standard IO module, bracket_ is defined to have type > > IO a -> (a -> IO b) -> IO c -> IO c > > However, in the Exception module in hslibs, bracket_ has type > > IO a -> IO b -> IO c -> IO c > > which

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Jerzy Karczmarczuk
Simon Peyton-Jones: > > Russell O'Connor suggests: > | but sinh and cosh can easily be defined in terms of exp > | > | sinh x = (exp(x) - exp(-x))/2 > | cosh x = (exp(x) + exp(-x))/2 > | I suggest removing sinh and cosh from the minimal complete > | definition, and add the above defaults. > >

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Lennart Augustsson
> 2. So, they hold for the Complex numbers as well. The gymnastics with >complex sinh and cosh seems to be redundant. Well, I would be a little careful changing these. Some of the definitions in numerical part of the Prelude look more convoluted than they need to be, but it's because they hav

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Lennart Augustsson
> | sinh x = (exp(x) - exp(-x))/2 > | cosh x = (exp(x) + exp(-x))/2 ... > This looks pretty reasonable to me. We should have default methods > for anything we can. Why not provide defaults for the inverse functions as well? asinh x = log (x + sqrt (1+x*x)) acosh x = log (x + (x+1) * sqr

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Kent Karlsson
- Original Message - From: "Jerzy Karczmarczuk" <[EMAIL PROTECTED]> ... > Simon Peyton-Jones: > > > > Russell O'Connor suggests: > > > | but sinh and cosh can easily be defined in terms of exp > > | > > | sinh x = (exp(x) - exp(-x))/2 > > | cosh x = (exp(x) + exp(-x))/2 > > > | I sugg

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Simon Peyton-Jones
| > 1. Actually, I wouldn't even call that "default | definitions". These ARE | >definitions of sinh and cosh. | | Mathematically, yes. Numerically, no. Even if 'exp' is | implemented with high accuracy, the suggested defaults may | return a very inaccurate (in ulps) result. Take sinh n

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread roconnor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 15 Oct 2001, Lennart Augustsson wrote: > Why not provide defaults for the inverse functions as well? > > asinh x = log (x + sqrt (1+x*x)) > acosh x = log (x + (x+1) * sqrt ((x-1)/(x+1))) > atanh x = log ((x+1) / sqrt (1 - x*x)) T

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Lennart Augustsson
> That's a good idea too. > Is there a reason for defining acosh as above instead of > acosh x = log(x + sqrt(x*x-1)) If there is one I can't remember it. :-) -- Lennart ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/

RTA 2002 Call for papers

2001-10-15 Thread Pierre Lescanne
CALL FOR PAPERS RTA 2002 13th International Conference on Rewriting Techniques and Applications July 22--24, Copenhagen, Denmark

RE: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread George Russell
Simon PJ wrote: > Fpr the Revised Haskell 98 report, Russell O'Connor suggests: > =20 > | Also, I understand you are reluctant to make library changes,=20 > | but sinh and cosh can easily be defined in terms of exp > |=20 > | sinh x =3D (exp(x) - exp(-x))/2 > | cosh x =3D (exp(x) + e

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Dylan Thurston
On Mon, Oct 15, 2001 at 06:27:52PM +0200, George Russell wrote: > Simon PJ wrote: > > Fpr the Revised Haskell 98 report, Russell O'Connor suggests: > > =20 > > | Also, I understand you are reluctant to make library changes,=20 > > | but sinh and cosh can easily be defined in terms of

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread George Russell
Dylan Thurston wrote: [snip] > > No. As has been pointed out, this is a bad idea numerically because > > it will give the wrong answer for sinh x for very small values of > > x. As a matter of fact, you will also get the wrong answer for very large > > values of x, where exp(x) can overflow even

Haskell Communities Survey - Second Call for Contributions

2001-10-15 Thread C.Reinke
Dear Haskellers, after the first rush of volunteers seems to have ebbed away, it is probably time for a reminder. First, the good news: We have just about enough topics covered to convince me that it makes sense to go ahead. So the Haskell Communities page has moved to a more permanent location

Re: Harmful spammers

2001-10-15 Thread Andre W B Furtado
> Or alternatively just report it using Spamcop (http://spamcop.net) or > some other reporting tool. Life is just too short to do this by hand > every time you get spam. CAUCE (The Coalition Against Unsolicited Commercial Email) seems to me a nice alternative. Check www.cauce.org. > On the Hask

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-15 Thread Fergus Henderson
On 15-Oct-2001, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: > > The proposal is only to give "default declarations" > in the class defn for sinh, cosh, and perhaps as Lennart suggests > asinh, acosh, atanh. They give a reasonable first cut if you > don't write definitions yourself. But you