RE: build error

2000-01-19 Thread Simon Marlow
I'm trying to build ghc using the latest cvs sources. When I do 'gmake all' I get: from ../includes/Rts.h:16, from Itimer.c:25, ../includes/PrimOps.h:806: parse error before `sigset_t' ../includes/PrimOps.h:806: warning: function declaration isn't a

RE: Segmentation Fault

2000-01-19 Thread Simon Marlow
I've now done a 3-stage bootstrap using exactly the same versions of GHC 4.04, gcc 2.95.2 and Solaris 7. Everything worked without a hitch. OK, after hacking ghc-inplace to stop it deleting all its files (is there a --keep-everything option?) and running hsc inside gdb I get: Glasgow

Re: `partition'

2000-01-19 Thread Joe Fasel
S.D.Mechveliani [EMAIL PROTECTED] writes | Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes | partition _ [] = ([], []) | partition p (x:xs) = if p x then (x:ys, zs) else (ys, x:zs) | where (ys, zs) = partition p xs | | runs your example in constant space. | | | Probably,

Type inference and binding groups

2000-01-19 Thread Keith Wansbrough
Type inference for Haskell (as described in Mark Jones' paper _Typing Haskell In Haskell_ and as performed by GHC) requires first splitting groups of let bindings into strongly-connected components. It then assumes that all binders in such a component will be generalised over the same vector

`partition'

2000-01-19 Thread S.D.Mechveliani
To | partition _ [] = ([], []) | partition p (x:xs) = if p x then (x:ys, zs) else (ys, x:zs) | where (ys, zs) = partition p xs | | runs your example in constant space. Joe Fasel [EMAIL PROTECTED] writes This probably works fine for many applications, but of course, it is a

Positive Num ?

2000-01-19 Thread Eileen Head
Is there an easy way to define a new class, X, of types which is a class of some range of types in an existing class Y. For example can you define a class PosNum in which the type in the class are positive Ints, positive Integers, positive Floats and positive Doubles?

RE: Type inference and binding groups

2000-01-19 Thread Mark P Jones
Hi Keith, | Type inference for Haskell (as described in Mark Jones' paper _Typing | Haskell In Haskell_ and as performed by GHC) requires first splitting | groups of let bindings into strongly-connected components. It then | assumes that all binders in such a component will be generalised

Positive Num ?

2000-01-19 Thread Tom Pledger
Hi. I'm 80% confident in this reply, and 99% confident that someone will correct me if it's wrong or misleading. :-) Eileen Head writes: Is there an easy way to define a new class, X, of types which is a class of some range of types in an existing class Y. Yes, but only if the existing

partition and lifted products

2000-01-19 Thread Joe Fasel
Folks, I claimed that these are different functions: partition1 p xs = (filter p xs, filter (not . p) xs) partition2 p = foldr (\x (ys, zs) - if p x then (x:ys,zs) else (ys,x:zs)) ([],[]) I was correct, but not for the reason I thought. Nota bene: partition1 p

Re: `partition'

2000-01-19 Thread Matt Harden
Joe Fasel wrote: S.D.Mechveliani [EMAIL PROTECTED] writes | Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes | partition _ [] = ([], []) | partition p (x:xs) = if p x then (x:ys, zs) else (ys, x:zs) | where (ys, zs) = partition p xs | | runs your example in constant

Re: `partition'

2000-01-19 Thread Matt Harden
Oops, everything I said had already been said elsewhere in the discussion; I just hadn't read it all yet. Sorry for the waste of bandwidth. Matt Harden wrote: a bunch of stuff that others had already said