equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Joshua Haberman
Hello, I'm quite new to Haskell, but experienced in other languages (C, Python, Ruby, SQL, etc). I am interested in Haskell because I've heard that the language is capable of lots of optimizations based on laziness, and I want to learn more about that. I dug in with Project Euler problem #1, and

Re: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Thomas DuBuisson
Josh, In general you'll find the haskell-cafe (haskell-c...@haskell.org) to be a more lively place for this type of discussion, but since we're here I might as well mention that memory use of a Haskell function is one of the hardest things to gain an understanding about. main = print (show (sum

Re: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Joshua Haberman
Hi Thomas, thanks for the reply! Thomas DuBuisson thomas.dubuisson at gmail.com writes: Josh, In general you'll find the haskell-cafe (haskell-cafe at haskell.org) to be a more lively place for this type of discussion Good to know, I just wasn't sure if it was appropriate for GHC-specific

Re: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Don Stewart
joshua: Hello, I'm quite new to Haskell, but experienced in other languages (C, Python, Ruby, SQL, etc). I am interested in Haskell because I've heard that the language is capable of lots of optimizations based on laziness, and I want to learn more about that. I dug in with Project Euler

Re[2]: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Bulat Ziganshin
Hello Joshua, Sunday, August 2, 2009, 11:45:57 AM, you wrote: 94,604 bytes allocated in the heap Is there any way I could find out what these 94kb of RAM were allocated for? This seems high -- my entire program's working set is 6kb. as Don said, compiled code works on Int#

Re: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Don Stewart
bulat.ziganshin: Hello Joshua, Sunday, August 2, 2009, 11:45:57 AM, you wrote: 94,604 bytes allocated in the heap Is there any way I could find out what these 94kb of RAM were allocated for? This seems high -- my entire program's working set is 6kb. as Don said,

Re: equivalent of EXPLAIN PLAN with GHC?

2009-08-02 Thread Don Stewart
dons: Showing what transformations happened. Notably, 2 occurences of the streamU/unstreamU transformation, to remove intermediate structures. The final code looks like: $s$wfold :: Int# - Int# $s$wfold = \ (sc_s19l :: Int#) - case modInt# (-9223372036854775807) 3 of

Re to `optimization for list'

2009-08-02 Thread Serge D. Mechveliani
Joshua Haberman jos...@reverberate.org writes on 2 Aug 2009 Hello, I'm quite new to Haskell, but experienced in other languages (C, Python, Ruby, SQL, etc). I am interested in Haskell because I've heard that the language is capable of lots of optimizations based on laziness, and I want to

Re: Working with GHC HEAD

2009-08-02 Thread Bertram Felgenhauer
Antoine Latter wrote: I was trying to see what GHC head was like, but I've run into a few snags compiling packages. There's a discrepancy between ghc and ghc-pkg that causes this. See http://hackage.haskell.org/trac/ghc/ticket/3410 My existing binary for cabal-install can install quite a few