win32 test installer

2002-02-08 Thread Sigbjorn Finne
A test Windows Installer for the 5.03 snapshot release is now available via http://galois.com/~sof/ghc-5.03-20020208.msi (25.2M) Unless I hear of any fatal flaws encountered using it or I discover glitches while sleeping, it will go up on haskell.org/ghc/ tomorrow morning (PST). --sigbjorn

ghc-5.02.1 Comments/Pragmas

2002-02-08 Thread Kevin Hammond
The parser fails (non-exhaustive pattern, parser/Parser.hs line 4700) if provided with a comment such as: {-##-} or {--} The comment {-#-} is however accepted! Presumably this is to do with pragma parsing! Kevin ___ Glasgow-haskell-bugs

RE: inscrutable warning

2002-02-08 Thread Julian Seward (Intl Vendor)
The warning says that the interpreter has ignored a polymorphic case, since it's hard to implement. Your program should still behave the same, although possibly less strictly than you intended. What really mystifies us is why there is such a thing in the program in the first place. Using

Re: ANNOUNCE: GHC 5.03.20020204 snapshot release

2002-02-08 Thread Sigbjorn Finne
A Windows Installer for this snapshot is now available via the GHC downloads page, http://haskell.org/ghc/download_ghc_snapshot.html enjoy --sof - Original Message - From: Julian Seward (Intl Vendor) [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday,

efficiency question

2002-02-08 Thread Hal Daume III
define test1 l = let s1 = foldr (+) 1 l s2 = foldr (-) 1 l in (s1, s2) test2 l = let s = foldr (\x (a,b) - (x+a,x-b)) (1,1) l in s why is test1 so much faster than test2 for long lists l (eg [1..100])? replacing foldr with foldl makes it faster (of course), but

Re: efficiency question

2002-02-08 Thread Jorge Adriano
On Friday 08 February 2002 22:14, Hal Daume III wrote: define test1 l = let s1 = foldr (+) 1 l s2 = foldr (-) 1 l in (s1, s2) test2 l = let s = foldr (\x (a,b) - (x+a,x-b)) (1,1) l in s why is test1 so much faster than test2 for long lists l (eg

socket question

2002-02-08 Thread Hal Daume III
suppose i want to write a stupid ftp client, i want to connect to the ftp server, wait for it to give it's intro stuff (welcome to blah, username: ) and then it wants input. how do i do something like this? so far, i have (don't laugh, this is the first socket haskell program i've written.

Re: efficiency question

2002-02-08 Thread Jorge Adriano
I'd say that's because in the second case you also got to apply the (,), besides the (+)/(-) constructor during the transversing... Am I right? opss... I meant to write: the (,) constructor besides the (+)/(-)... J.A. ___ Glasgow-haskell-users

Re: String manipulation.

2002-02-08 Thread Ketil Z. Malde
DK [EMAIL PROTECTED] writes: What I would like to ask, is how can I take a string from a list, and manipulate it, in order to convert it to an integer. That's very simple, and I'm of course happy to help out with homework questions. (That's what mailinglists are for, after all.) So, how

Jan Skibinski's lhs modules ?

2002-02-08 Thread Wilhelm B. Kloke
As the site www.numeric-quest.com does not respond to my queries, I would like to ask the community, where I can find a collection of the modules QuantumVector.lhs etc. ? -- Dipl.-Math. Wilhelm Bernhard Kloke Institut fuer Arbeitsphysiologie an der Universitaet Dortmund Ardeystrasse 67, D-44139

Specifying Kinds of Types

2002-02-08 Thread Ashley Yakeley
I'd like to be able to declare the kinds of new types and synonyms, because sometimes Haskell can't infer them. For instance: data CMap0 p q = MkCMap0; Without evidence, Haskell assumes that p and q have kind '*' (as per sec. 4.6), and therefore CMap0 has kind '* - * - *'. Actually, I

Re: Specifying Kinds of Types

2002-02-08 Thread Koen Claessen
Ashley Yakeley wondered: | I'd like to be able to declare the kinds of new types | and synonyms, because sometimes Haskell can't infer | them. For instance: | | data CMap0 p q = MkCMap0; | | Actually, I wanted p and q to both have kind '* - *'. The following workaround might be

Re: Specifying Kinds of Types

2002-02-08 Thread Lennart Augustsson
data CMap0 (p ::: * - *) (q ::: * - *) = MkCMap0; Or data (CMap0 :: (* - *) - (* - *) - *) = MkCMap0 -- Lennart ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Specifying Kinds of Types

2002-02-08 Thread Rijk J . C . van Haaften
Ashley Yakeley wrote: I'd like to be able to declare the kinds of new types and synonyms, because sometimes Haskell can't infer them. For instance: data CMap0 p q = MkCMap0; Without evidence, Haskell assumes that p and q have kind '*' (as per sec. 4.6), and therefore CMap0 has kind '* - *

Re: Specifying Kinds of Types

2002-02-08 Thread Ross Paterson
On Fri, Feb 08, 2002 at 12:39:30PM +0100, Rijk J.C.van Haaften wrote: Ashley Yakeley wrote: I'd like to be able to declare the kinds of new types and synonyms, because sometimes Haskell can't infer them. It is possible using a trick due to John Hughes. In Proceedings of the 1999

Re: Specifying Kinds of Types

2002-02-08 Thread John Hughes
Ashley Yakeley wrote: I'd like to be able to declare the kinds of new types and synonyms, because sometimes Haskell can't infer them. For instance: data CMap0 p q = MkCMap0; Without evidence, Haskell assumes that p and q have kind '*' (as per sec.

RE: Specifying Kinds of Types

2002-02-08 Thread Simon Peyton-Jones
Yes. GHC already does this in interface files, and it'd be rather easy to make it do so in source programs too. It seems like the Right Thing to do. I'll do it. (John suggests going to kind polymorphism, but that would raise a bunch of new issues in GHC's impls so I won't do that. Yet.) Simon

Re: ANNOUNCE: GHC 5.03.20020204 snapshot release

2002-02-08 Thread Sigbjorn Finne
A Windows Installer for this snapshot is now available via the GHC downloads page, http://haskell.org/ghc/download_ghc_snapshot.html enjoy --sof - Original Message - From: Julian Seward (Intl Vendor) [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday,

[Newbie] Programming with MArray

2002-02-08 Thread José Romildo Malaquias
Hello. To learn how to program with muttable arrays in Haskell, I have done a very simple program to sum two arrays. I am submitting it to this group so that it can be reviewd and commented. I have not find examples on how to program with muttable arrays. I would like for instance to see

efficiency question

2002-02-08 Thread Hal Daume III
define test1 l = let s1 = foldr (+) 1 l s2 = foldr (-) 1 l in (s1, s2) test2 l = let s = foldr (\x (a,b) - (x+a,x-b)) (1,1) l in s why is test1 so much faster than test2 for long lists l (eg [1..100])? replacing foldr with foldl makes it faster (of course), but

Re: efficiency question

2002-02-08 Thread Jorge Adriano
On Friday 08 February 2002 22:14, you wrote: define test1 l = let s1 = foldr (+) 1 l s2 = foldr (-) 1 l in (s1, s2) test2 l = let s = foldr (\x (a,b) - (x+a,x-b)) (1,1) l in s why is test1 so much faster than test2 for long lists l (eg [1..100])?

RE: efficiency question

2002-02-08 Thread Konst Sushenko
On Friday 08 February 2002 22:14, you wrote: define test1 l = let s1 = foldr (+) 1 l s2 = foldr (-) 1 l in (s1, s2) test2 l = let s = foldr (\x (a,b) - (x+a,x-b)) (1,1) l in s why is test1 so much faster than test2 for long lists l (eg

RE: efficiency question

2002-02-08 Thread Hal Daume III
I've tried using a strict fold: foldl' f a [] = a foldl' f a (x:xs) = (foldl' f $! f a x) xs but that has no effect (or minimal effect). -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra |

RE: efficiency question

2002-02-08 Thread Hal Daume III
This doesn't seem to make a difference, eithr (I just tried it). - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Fri, 8 Feb 2002, Konst Sushenko wrote: Did you try strict

Re: efficiency question

2002-02-08 Thread Jorge Adriano
On Friday 08 February 2002 23:52, Hal Daume III wrote: I've tried using a strict fold: foldl' f a [] = a foldl' f a (x:xs) = (foldl' f $! f a x) xs but that has no effect (or minimal effect). That wouldn't work even if if laziness is the problem because that would only cause the

Re: efficiency question

2002-02-08 Thread Hal Daume III
I agree that it's the overhead of (,), but I don't see why there would be any overhead for doing this. -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Sat, 9 Feb 2002, Jorge Adriano

Kinds Workaround

2002-02-08 Thread Ashley Yakeley
At 2002-02-08 03:36, Koen Claessen wrote: Here, you might do the following trick: type HasKind_Help x dummy = x type HasKind_Star_To_Star x = HasKind_Help x (x Int) type C c x y = c (HasKind_Star_To_Star x) (HasKind_Star_To_Star y) type Composer c =

Re: Re: XSLT, Perl, Haskell, a word on language design

2002-02-08 Thread Eray Ozkural (exa)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 05 February 2002 12:29, Dimitre Novatchev wrote: So, there are actually people who seriously take XSLT to be a programming language? Interesting, as I think it is just overdoing an already overdone concept (hint: it's a poor

Re: Simpler Fibonacci function

2002-02-08 Thread Eray Ozkural (exa)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 05 February 2002 21:08, Paul Hudak wrote: Well, I cannot speak for the other references, since I did not write them :-). On the other hand, stream processing *is* a stylistic way to write certain kinds of functional programs, with the

RE: character syntax

2002-02-08 Thread Simon Marlow
itz All this taken together, I mean, _really_, is the lexical itz structure of Haskell a botch, or what? Jon No. Innovative. All the problems described in this thread reflect Jon unwarranted assumptions inherited in emacs. It's plainly possible Jon to parse Haskell, and not hard either.

Re: character syntax

2002-02-08 Thread Jorge Adriano
On Friday 08 February 2002 14:35, Ketil Z. Malde wrote: Jorge Adriano [EMAIL PROTECTED] writes: Haskell looks nice... Isabell looks beautiful :-) I'm not familiar with Isabell, but aren't we comparing apples and oranges here? E.g. you can prettify .lhs pretty nicely with one of the LaTeX

Re: efficiency question

2002-02-08 Thread Jorge Adriano
I'd say that's because in the second case you also got to apply the (,), besides the (+)/(-) constructor during the transversing... Am I right? opss... I meant to write: the (,) constructor besides the (+)/(-)... J.A. ___ Haskell-Cafe mailing list

RE: efficiency question

2002-02-08 Thread Konst Sushenko
(moved to haskell-café) I ran Hal's code on my computer, and with test2 I get a stack overflow (so I had to use +RTS option for it to finish). test1 does not overflow stack (of standard size, I mean without +RTS). Which implies that test2 uses more stack space than test1. why would it use