Haskell Performance-Analysis
===

While solving some Project Euler Problems to learn Haskell (so currently I'm a completly beginner) I came over [Problem 13][1]. I wrote this (naive) solution:

    --Get Number of Divisors of n
    numDivs :: Integer -> Integer
    numDivs n = toInteger $ length [ x | x<-[2.. ((n `quot` 2)+1)], n `rem` x == 0] + 2
    
    --Generate a List of Triangular Values
    triaList :: [Integer]
    triaList =  [foldr (+) 0 [1..n] | n <- [1..]]
    
    --The same recursive
    triaList2 = go 0 1
      where go cs n = (cs+n):go (cs+n) (n+1)
    
    --Finds the first triangular Value with more than n Divisors
    sol :: Integer -> Integer
    sol n = head $ filter (\x -> numDivs(x)>n) triaList2

This Solution for n=500 (sol 500) is extremly slow (running for more than 2 hours now), so I wondered how to find out why this solution is so slow. Are there any commands that tell me where most of the computation-time is spend so I know which part of my haskell-program is slow? Something like a simple profiler.

To make it clear, i'm not asking **for** a faster solution but for **a way** to find this solution. How would you start if you would have no haskell knowledge?

I tried to write two triaList functions but found no way to test which one is faster, so thats where my problems start.

Thanks

   [1]: http://projecteuler.net/index.php?section=problems&id=12