Re: I accidentally the Prelude

2010-03-03 Thread Simon Marlow
On 02/03/2010 17:45, Yitzchak Gale wrote: Jeremy Shaw wrote: I would still vote for that error in the 'worst ghc error message contest'... Simon Marlow wrote: Oh, the problem here is that... when we got around to trying to import it we found that it was not loaded. Perhaps the implicit

Re: I accidentally the Prelude

2010-03-03 Thread Simon Marlow
On 03/03/2010 12:37, Yitzchak Gale wrote: Jeremy Shaw wrote: I would still vote for that error in the 'worst ghc error message contest'... I wrote: Can't we add something like (Is there more than one Prelude in your path?) to the message for Prelude? Simon Marlow wrote: So I could add a

Re: I accidentally the Prelude

2010-03-03 Thread Yitzchak Gale
I wrote: I was suggesting that whenever the Prelude fails to load, the error message should contain that hint. hmm, I'll think about that. Is it not enough to see a compilation error pointing to the file Prelude.hs? Seems obvious in the context of this thread. But not being in the middle of

stg-ap-1-upd-info

2010-03-03 Thread Herk, Robert van
Hi All, I am optimizing a program to consume less memory. If I profile it with +RTS -hd, it reports to fill 50% of my memory with stg-ap-1-upd-info. Does this mean anything? Regards, Robert The information contained in this message may be confidential and legally protected under applicable

Re: stg-ap-1-upd-info

2010-03-03 Thread Thomas Schilling
I think it means you're created lots of thunks of the form (f x). Perhaps some foldl vs foldl' issue? If you're not using foldl anywhere, look at tail recursive functions and try and make their accumulators strict. HTH On 3 March 2010 16:11, Herk, Robert van robert.van.h...@philips.com wrote:

Issue with type families

2010-03-03 Thread Tyson Whitehead
The following code {-# LANGUAGE FlexibleInstances, TypeFamilies #-} import Control.Applicative class Z t where type W t z :: t - W t instance Z (a - b) where type W (a - b) = a - b z = id instance Z (IO (a - b)) where type W (IO (a - b)) = IO a - IO b

Re: Issue with type families

2010-03-03 Thread Tyson Whitehead
On March 3, 2010 18:35:26 Daniel Fischer wrote: Because: instance Applicative ((-) a) -- Defined in Control.Applicative so, from the instance Z (a - b), with b == c - d, we have an instance Z (a - (b - c)) and from instance Z (m (u - v)), we have, with m == ((-) x), an instance Z (x -

Re: Issue with type families

2010-03-03 Thread Daniel Fischer
Am Donnerstag 04 März 2010 02:39:30 schrieb Tyson Whitehead: On March 3, 2010 18:35:26 Daniel Fischer wrote: Because: instance Applicative ((-) a) -- Defined in Control.Applicative so, from the instance Z (a - b), with b == c - d, we have an instance Z (a - (b - c)) and from