$ stack clean # rebuild the project with profining enabled stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts" # run for time profiling stack exec -- debug-main +RTS -p # run for memory profiling stack exec -- debug-main +RTS -h