Homeworks and art of flying.

2001-05-28 Thread Jerzy Karczmarczuk
Ashley Yakeley answers the query of Rab Lee: hi, i'm having a bit more touble, can anyone help me or give me any hints on how to do this : x 2 3 4 = (x, [2, 3, 4]) Generally we don't solve homework for people. Unless they're studying under Prof. Karczmarczuk, of course. -- Ashley

RE: (no subject)

2001-05-28 Thread Simon Peyton-Jones
This looks like a good thread to move to [EMAIL PROTECTED] http://haskell.org/mailinglist.html Simon | -Original Message- | From: Rab Lee [mailto:[EMAIL PROTECTED]] | Sent: 26 May 2001 08:48 | To: [EMAIL PROTECTED] | Subject: (no subject) | | | hi, i'm having a bit more

Building Programs Again

2001-05-28 Thread Steinitz, Dominic J
I am going to install hmake and upgrade to ghc 5 but in the meantime I decided to use make. I am puzzled however. Presumably building a module that imports a module needs the .hi file and therefore the makefile should be something like this: Tagsv1.o : Tagsv1.hs ghc -c Tagsv1.hs

RE: Building Programs Again

2001-05-28 Thread Simon Marlow
I am going to install hmake and upgrade to ghc 5 but in the meantime I decided to use make. I am puzzled however. Presumably building a module that imports a module needs the .hi file and therefore the makefile should be something like this: Tagsv1.o : Tagsv1.hs ghc -c

Re: The next step

2001-05-28 Thread Frank Atanassow
Simon Marlow wrote (on 28-05-01 10:17 +0100): It's not propaganda. The fact is if any of the standard libraries use the LGPL, then some people will be prevented from using them. That's the last thing we want, right? Now you might argue from a moral standpoint that the companies that these

Why is there a space leak here?

2001-05-28 Thread David Bakin
Why is there a space leak in foo1 but not in foo2? (I.e., in Hugs Nov '99) foo1 eats cells (and eventually runs out) where foo2 doesn't. That is, if I do (length (foo1 100)) I eventually run out of cells but (length (foo2 100)) runs fine (every GC returns basically the same amount

Notation question

2001-05-28 Thread Juan Carlos Arevalo Baeza
Just a very naive question, because I'm really curious. I've seen in previous messages here discussions about type systems using this kind of notation: G |- f :: all x::S . T G |- s :: S -- G |- f s :: [s/x]T I'd never seen it before,

Re: Notation question

2001-05-28 Thread Mark Carroll
On Mon, 28 May 2001, Juan Carlos Arevalo Baeza wrote: Just a very naive question, because I'm really curious. I've seen in previous messages here discussions about type systems using this kind of notation: G |- f :: all x::S . T G |- s :: S

Re: Notation question

2001-05-28 Thread Juan Carlos Arevalo Baeza
At 09:24 PM 5/28/2001 -0400, Mark Carroll wrote: G |- f :: all x::S . T G |- s :: S -- G |- f s :: [s/x]T I'm far from the right person to have a go, but while we're waiting for someone who knows what they're talking about: :) Thanx.

Re: Notation question

2001-05-28 Thread David Scarlett
- Original Message - From: Juan Carlos Arevalo Baeza [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 29, 2001 11:02 AM Subject: Notation question Just a very naive question, because I'm really curious. I've seen in previous messages here discussions about type systems

sum1, -O

2001-05-28 Thread S.D.Mechveliani
Please, what is the matter here with ghc-5.00.1 (compiled from source for Linux i386-unknown) ? -- sum1 :: (Num a) = [a] - a sum1 [] = error sum1 []\n sum1 (x:xs) = sm xs x where sm [] s = s sm (x:xs) s = sm xs (x+s) main =

RE: ghc-5.00.1: can't find `demo/D_permut.o' to unload

2001-05-28 Thread Simon Marlow
Dear ghc-5.00.1 (built from source for Linux i386-unkkown), here is something like a bug. ah, no wait, I've found it. Thanks for the report! Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED]

RE: Evacuated Object

2001-05-28 Thread Simon Peyton-Jones
The error means that GHC's garbage collector has come across something it doesn't understand. It's either a bug in the GHC garbage collector, or in GHCi itself (which plays fast and loose with types in one or two places) or in something to do with the SDL graphics interface. Bugs like this

RE: Functional programming in Python

2001-05-28 Thread Malcolm Wallace
It seems that right-associativity is so intuitive that even the person proposing it doesn't get it right. :-) Partial applications are a particular problem: Haskell Non-Haskell Left Associative Right Associative From

RE: Funny type.

2001-05-28 Thread Simon Peyton-Jones
You need a language extension. Check out Section 7 of Derivable type classes http://research.microsoft.com/~simonpj/Papers/derive.htm Alas, I have not implemented the idea yet. (Partly because no one ever reports it as a problem; you are the first!) Simon | One day I was playing

Multithreaded stateful software

2001-05-28 Thread Mark Carroll
Often I've found that quite how wonderful a programming language is isn't clear until you've used it for a non-trivial project. So, I'm still battling on with Haskell. One of the projects I have coming up is a multi-threaded server that manages many clients in performing a distributed

Re: Funny type.

2001-05-28 Thread Ken Shan
On 2001-05-27T22:46:37-0500, Jay Cox wrote: data S m a = Nil | Cons a (m (S m a)) instance (Show a, Show (m (S m a))) = Show (S m a) where show Nil = Nil show (Cons x y) = Cons ++ show x ++ ++ show y Here's how I've been handling such situations: data S m a = Nil | Cons a (m

Re: Multithreaded stateful software

2001-05-28 Thread Joe English
Mark Carroll wrote: One of the projects I have coming up is a multi-threaded server that manages many clients in performing a distributed computation using a number of computers. [...] (a) This really isn't what Haskell was designed for, and if I try to write this in Haskell I'll never

RE: Multithreaded stateful software

2001-05-28 Thread Simon Peyton-Jones
| (c) Haskell's monads, concurrency stuff and TCP/IP libraries | are really quite powerful and useful, and I'll be happy I | picked Haskell for the task. Definitely (c). See Simon Marlow's paper about his experience of writing a web server (highly concurrent), and my tutorial Tackling the

Why is there a space leak here?

2001-05-28 Thread Tom Pledger
David Bakin writes: : | I have been puzzling over this for nearly a full day (getting this | reduced version from my own code which wasn't working). In | general, how can I either a) analyze code looking for a space leak | or b) experiment (e.g., using Hugs) to find a space leak? Thanks!

Re: Why is there a space leak here?

2001-05-28 Thread Michal Gajda
On Tue, 29 May 2001, Tom Pledger wrote: David Bakin writes: a) Look at how much of the list needs to exist at any one time. | -- This has a space leak, e.g., when reducing (length (foo1 100)) | foo1 m | = take m v | where | v = 1 : flatten (map triple v) |

Re: Why is there a space leak here?

2001-05-28 Thread Tom Pledger
Michal Gajda writes: | On Tue, 29 May 2001, Tom Pledger wrote: : | When you consume the (3N)th cell of v, you can't yet garbage collect | the Nth cell because it will be needed for generating the (3N+1)th, | (3N+2)th and (3N+3)th. | | So, as you proceed along the list, about two

Re: Why is there a space leak here?

2001-05-28 Thread David Bakin
Ah, thank you for pointing out concat to me. (Oddly, without knowing about concat, I had tried foldr1 (++) and also foldl1 (++) but got the same space problem and so tried to 'factor it out'.) OK, now I see what's going on - your explanation is good, thanks. Which of the various tools built-in

Re: Type resolution problem

2001-05-28 Thread Marcin 'Qrczak' Kowalczyk
Mon, 28 May 2001 17:53:38 -0700, Juan Carlos Arevalo Baeza [EMAIL PROTECTED] pisze: Uncommenting the type expression above clears the error. But, why can't the compiler deduce it by itself? Monomorphism restriction strikes again. See section 4.5.5 in the Haskell 98 Report. A pattern binding