<pre><code>stack ghci advent01:exe:advent01</code></pre>
<p>if the first form is ambiguous.</p>
<p>To profile, use</p>
-<pre><code>stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"</code></pre>
+<pre><code>stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts" advent01</code></pre>
<p>then run with</p>
-<pre><code>stack exec -- advent01 +RTS -p -hy</code></pre>
+<pre><code>stack exec --profile -- advent01 +RTS -p -hy</code></pre>
<p>Generate the profile graph with</p>
<pre><code>stack exec hp2ps advent01.hp</code></pre>
<h1 id="packages">Packages</h1>
To profile, use
```
-stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"
+stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts" advent01
```
then run with
```
-stack exec -- advent01 +RTS -p -hy
+stack exec --profile -- advent01 +RTS -p -hy
```
Generate the profile graph with
```