"Hello"
"Hello"
badCase
CallStack (from HasCallStack):
  error, called at tough.hs:39:14 in main:Main
badCase
CallStack (from HasCallStack):
  error, called at tough.hs:39:14 in main:Main
"Bark"
"Hello"
(1,2,3)


 71% expressions used (68/95)
 14% boolean coverage (1/7)
       0% guards (0/4), 3 always True, 1 always False
      33% 'if' conditions (1/3), 1 always True, 1 always False
     100% qualifiers (0/0)
 58% alternatives used (7/12)
100% local declarations used (0/0)
 83% top-level declarations used (5/6)


-----<module Main>-----
 71% expressions used (68/95)
 14% boolean coverage (1/7)
       0% guards (0/4), 3 always True, 1 always False
      33% 'if' conditions (1/3), 1 always True, 1 always False
     100% qualifiers (0/0)
 58% alternatives used (7/12)
100% local declarations used (0/0)
 83% top-level declarations used (5/6)


Writing: Main.hs.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
span.lineno { color: white; background: #aaaaaa; border-right: solid white 12px }
span.nottickedoff { background: yellow}
span.istickedoff { background: white }
span.tickonlyfalse { margin: -1px; border: 1px solid #f20913; background: #f20913 }
span.tickonlytrue  { margin: -1px; border: 1px solid #60de51; background: #60de51 }
span.funcount { font-size: small; color: orange; z-index: 2; position: absolute; right: 20 }
span.decl { font-weight: bold }
span.spaces    { background: white }
</style>
</head>
<body>
<pre>
<span class="decl"><span class="nottickedoff">never executed</span> <span class="tickonlytrue">always true</span> <span class="tickonlyfalse">always false</span></span>
</pre>
<pre>
<span class="lineno">    1 </span>import Control.Exception as E
<span class="lineno">    2 </span>
<span class="lineno">    3 </span>-- This test shows what hpc can really do.
<span class="lineno">    4 </span>
<span class="lineno">    5 </span><span class="decl"><span class="istickedoff">main = do</span>
<span class="lineno">    6 </span><span class="spaces">  </span><span class="istickedoff">print (&quot;Hello&quot;)</span>
<span class="lineno">    7 </span><span class="spaces">  </span><span class="istickedoff">foo &quot;Hello&quot;</span>
<span class="lineno">    8 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">44</span>))</span>
<span class="lineno">    9 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>
<span class="lineno">   10 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">(error &quot;Foo&quot;)</span>))</span>
<span class="lineno">   11 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>
<span class="lineno">   12 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print &quot;Bark&quot;)</span>
<span class="lineno">   13 </span><span class="spaces">          </span><span class="istickedoff"><span class="nottickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span></span>
<span class="lineno">   14 </span><span class="spaces">  </span><span class="istickedoff">(_,_) &lt;- return $ (<span class="nottickedoff">&quot;Hello&quot;</span>,<span class="nottickedoff">&quot;World&quot;</span>)</span>
<span class="lineno">   15 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span>
<span class="lineno">   16 </span><span class="spaces">  </span><span class="istickedoff">() &lt;- return ()</span>
<span class="lineno">   17 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
<span class="lineno">   18 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwoz</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>
<span class="lineno">   19 </span><span class="spaces">    </span><span class="istickedoff">_             -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
<span class="lineno">   20 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
<span class="lineno">   21 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>
<span class="lineno">   22 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
<span class="lineno">   23 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>
<span class="lineno">   24 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> </span>
<span class="lineno">   25 </span><span class="spaces">      </span><span class="istickedoff">, <span class="tickonlyfalse">False</span>      -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>
<span class="lineno">   26 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; return &quot;Hello&quot;</span>
<span class="lineno">   27 </span><span class="spaces">  </span><span class="istickedoff">print t</span>
<span class="lineno">   28 </span><span class="spaces">  </span><span class="istickedoff">print foo2</span></span>
<span class="lineno">   29 </span>
<span class="lineno">   30 </span><span class="decl"><span class="istickedoff">foo x = do</span>
<span class="lineno">   31 </span><span class="spaces">  </span><span class="istickedoff">print x</span>
<span class="lineno">   32 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span></span>
<span class="lineno">   33 </span>
<span class="lineno">   34 </span><span class="decl"><span class="nottickedoff">unused_ a = a</span></span>
<span class="lineno">   35 </span>
<span class="lineno">   36 </span>badCase :: Int -&gt; Int -&gt; Int
<span class="lineno">   37 </span><span class="decl"><span class="istickedoff">badCase a b = </span>
<span class="lineno">   38 </span><span class="spaces">        </span><span class="istickedoff">if a &gt; 100 </span>
<span class="lineno">   39 </span><span class="spaces">        </span><span class="istickedoff">then error &quot;badCase&quot; </span>
<span class="lineno">   40 </span><span class="spaces">        </span><span class="istickedoff">else if <span class="tickonlyfalse">a &gt; 1000</span> </span>
<span class="lineno">   41 </span><span class="spaces">             </span><span class="istickedoff">then <span class="nottickedoff">1</span> </span>
<span class="lineno">   42 </span><span class="spaces">             </span><span class="istickedoff">else badCase (a + 1) <span class="nottickedoff">(b - 1)</span></span></span>
<span class="lineno">   43 </span>
<span class="lineno">   44 </span>
<span class="lineno">   45 </span><span class="decl"><span class="istickedoff">foo2 = (1,2, if <span class="tickonlytrue">True</span> then 3 else <span class="nottickedoff">4</span>)</span></span>
<span class="lineno">   46 </span>
<span class="lineno">   47 </span><span class="decl"><span class="istickedoff">otherwoz = True</span></span>

</pre>
</body>
</html>
Writing: hpc_index.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">table.bar { background-color: #f25913; }
td.bar { background-color: #60de51;  }
td.invbar { background-color: #f25913;  }
table.dashboard { border-collapse: collapse  ; border: solid 1px black }
.dashboard td { border: solid 1px black }
.dashboard th { border: solid 1px black }
</style>
</head><body><table class="dashboard" width="100%" border=1>
<tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
<td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
<tr></tr><tr style="background: #e0e0e0">
<th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
</table></body></html>
Writing: hpc_index_fun.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">table.bar { background-color: #f25913; }
td.bar { background-color: #60de51;  }
td.invbar { background-color: #f25913;  }
table.dashboard { border-collapse: collapse  ; border: solid 1px black }
.dashboard td { border: solid 1px black }
.dashboard th { border: solid 1px black }
</style>
</head><body><table class="dashboard" width="100%" border=1>
<tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
<td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
<tr></tr><tr style="background: #e0e0e0">
<th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
</table></body></html>
Writing: hpc_index_alt.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">table.bar { background-color: #f25913; }
td.bar { background-color: #60de51;  }
td.invbar { background-color: #f25913;  }
table.dashboard { border-collapse: collapse  ; border: solid 1px black }
.dashboard td { border: solid 1px black }
.dashboard th { border: solid 1px black }
</style>
</head><body><table class="dashboard" width="100%" border=1>
<tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
<td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
<tr></tr><tr style="background: #e0e0e0">
<th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
</table></body></html>
Writing: hpc_index_exp.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">table.bar { background-color: #f25913; }
td.bar { background-color: #60de51;  }
td.invbar { background-color: #f25913;  }
table.dashboard { border-collapse: collapse  ; border: solid 1px black }
.dashboard td { border: solid 1px black }
.dashboard th { border: solid 1px black }
</style>
</head><body><table class="dashboard" width="100%" border=1>
<tr><th rowspan=2><a href="hpc_index.html">module</a></th><th colspan=3><a href="hpc_index_fun.html">Top Level Definitions</a></th><th colspan=3><a href="hpc_index_alt.html">Alternatives</a></th><th colspan=3><a href="hpc_index_exp.html">Expressions</a></th></tr><tr><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th><th>%</th><th colspan=2>covered / total</th></tr><tr>
<td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
<tr></tr><tr style="background: #e0e0e0">
<th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>
<td align="right">83%</td><td>5/6</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="83%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">58%</td><td>7/12</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="58%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td><td align="right">71%</td><td>68/95</td><td width=100><table cellpadding=0 cellspacing=0 width="100" class="bar"><tr><td><table cellpadding=0 cellspacing=0 width="71%"><tr><td height=12 class="bar"></td></tr></table></td></tr></table></td></tr>
</table></body></html>


