GHC *is* resource hungry

2003-05-29 Thread Ralf Hinze
Here is a harmless little program (no recursion, no data types) which GHC doesn't manage to compile (well, the kernel kills GHC after a while on a machine with generous 512MB of main memory and 1GB of swap space). begin next = next id leaf k i next = next (k i) fork k next = next (\ t u - k (t

Re: GHC *is* resource hungry

2003-05-29 Thread Ralf Hinze
I bet it's massive types. Translate the program into system F and see. (I remember this came up when looking at Okasaki's sequences of code combinators.) Your bet is most likely the correct one (yes, I peeked at Chris' HW2002 paper). GHC doesn't try to hash-cons types, because it usually

RE: GHC *is* resource hungry

2003-05-29 Thread Simon Peyton-Jones
| GHC doesn't try to hash-cons types, because it usually doesn't matter, | but I bet it does here. | | Would this be a major rewrite? [As an aside, a similiar problem showed up | when generating conversion functions for generic representation types.] I really don't know. Hash-consing is

RE: GHC *is* resource hungry

2003-05-29 Thread Simon Marlow
As far as I know, Hugs doesn't hash-cons types, yet it manages to typecheck these pathalogical examples in reasonable time/space. I vaguely recall there being a specific modification to Hugs's typechecker to handle this, but I can't remember what it was. Cheers, Simon -Original

n + k patterns

2003-05-29 Thread Ralf Hinze
GHCi infers for fac 0 = 1 fac (n + 1) = (n + 1) * fac n the following type / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 5.04.2, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_|

RE: GHC *is* resource hungry

2003-05-29 Thread Simon Peyton-Jones
I'm not sure it's the type inference so much as the type abstractions and applications. But yes, your point is a good one S | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Simon Marlow | Sent: 28 May 2003 18:03 | To: Simon Peyton-Jones; Ralf Hinze

RE: Removing greencard from project list

2003-05-29 Thread Simon Marlow
I'd like to remove greencard from the list of projects that can get built if you 'make' in fptools. I see a list AllProjects which include 'green-card' in fptools/mk/config.mk.in Is this the bit I need to edit? It looks plausible but I'm not certain. Yes, that should work. Why

Re: building ghc from source

2003-05-29 Thread Alastair Reid
On Thursday 29 May 2003 12:48 am, Mike Thomas wrote: 1. That Greencard and HDirect have been lagging behind the mainstream of GHC library changes for some time now - it has been hard to get them in step through the major FFI and library changes because few people have the time and/or