[Haskell-cafe] why does a foldr not have a space leak effect?

2012-07-23 Thread Qi Qi
Hi, I wonder why a foldr does not have a space leak effect? Any hints? Thanks. Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] why does a foldr not have a space leak effect?

2012-07-23 Thread Qi Qi
Foldl has the space leak effect, and that's why foldl' has been recommended. On Monday, July 23, 2012 9:44:59 PM UTC-5, Ivan Lazar Miljenovic wrote: (Trying again using the real mailing list address rather than google groups) On 24 July 2012 12:37, Qi Qi qiqi...@gmail.com wrote: Hi

Re: [Haskell-cafe] why does a foldr not have a space leak effect?

2012-07-23 Thread Qi Qi
This question actually was risen when I read a relevant part in the RWH book. Now it's much clearer to me. Thanks Ivan! On Monday, July 23, 2012 10:04:00 PM UTC-5, Ivan Lazar Miljenovic wrote: On 24 July 2012 12:52, Qi Qi qiqi...@gmail.com wrote: Foldl has the space leak effect, and that's

[Haskell-cafe] wondering about a MonadIO instance for a heap data type

2012-07-11 Thread Qi Qi
Hi, I was wondering about creating an instance of MonadIO for a heap data. Any hints? data Heap a = E | T Int a (Heap a) (Heap a) deriving (Eq, Ord, Read, Show) The reason is that I want to use liftIO during a heapsort to print out intermediate results. Thanks. Qi Qi

Re: [Haskell-cafe] wondering about a MonadIO instance for a heap data type

2012-07-11 Thread Qi Qi
absolutely must use IO, add IO to the functions type. 11.07.2012, в 15:19, Qi Qi qiqi...@gmail.com написал(а): Hi, I was wondering about creating an instance of MonadIO for a heap data. Any hints? data Heap a = E | T Int a (Heap a) (Heap a) deriving (Eq, Ord, Read, Show

[Haskell-cafe] haskell.org website ?

2012-07-05 Thread Qi Qi
Hi, Haskell.org website seems dropping offline at this moment. Anyone know what's happening to it? Thanks, Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] how to print out intermediate results in a recursive function?

2012-02-04 Thread Qi Qi
as) (mergesort bs) where trace = tell . O . print main = let (_, O trace) = runWriter $ mergesort [3,1,4,2,10,8,4,7,6] in trace -- Qi Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] how to print out intermediate results in a recursive function?

2012-02-03 Thread Qi Qi
the number lists in every recursive level. How can I do that? Thanks. -- Qi Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] how long could it wait for an account on hackageDB?

2011-08-23 Thread Qi Qi
? Thanks, -- Qi Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] have anyone tried GHC 7.0.2

2011-03-08 Thread Qi Qi
.tar.gz from http://www.galois.com/~dons/code/2011.2.0.0/, but they are not official yet. C. Am 08.03.2011 19:20, schrieb Qi Qi: Hi, After I installed GHC 7.0.2 and cabal-install 0.10.0 using Cabal library 1.10.1, I found that some package failed to install. For example like Happy, I got

[Haskell-cafe] some problem with Cabal

2011-03-08 Thread Qi Qi
: *** [build.stamp] Error 2 I think this is the same problem as I got during installing some other packages via cabal such as hmatrix, ghc-mod, happy and etc. Does anyone have any idea about how to solve it? Thanks! -- Qi Qi ___ Haskell-Cafe mailing list

[Haskell-cafe] have anyone tried GHC 7.0.2

2011-03-07 Thread Qi Qi
! -- Qi Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] can Haskell do everyting as we want?

2010-08-03 Thread Qi Qi
++. Is there anyone happen to come into any tasks that haskell is not able to achieve? Thanks. -- Qi Qi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe