
The program is running too quickly for any profiling to occur. You can tell with the RTS option -S and looking to see if major collections occur. Try increasing the amount of computation. Edward Excerpts from Cody Goodman's message of 2016-03-11 20:54:43 -0800:
Here is the command line log of my attempt following real world haskell's memory profiling example:
src λ stack exec -- ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.3 src λ cat Main.hs module Main where
main :: IO () main = do let x = {-# SCC sum #-}sum [1..500] print x {-# SCC helloworld #-} putStrLn "hello world" src λ stack exec -- ghc -O2 --make Main.hs -prof -auto-all -caf-all -fforce-recomp [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... src λ ./Main +RTS -hc -p 125250 hello world src λ cat Main.hp JOB "Main +RTS -hc -p" DATE "Fri Mar 11 22:51 2016" SAMPLE_UNIT "seconds" VALUE_UNIT "bytes" BEGIN_SAMPLE 0.00 END_SAMPLE 0.00 BEGIN_SAMPLE 0.00 END_SAMPLE 0.00