Add a test for HPC with a literate source file in a subdirectory
[packages/hpc.git] / tests / function / subdir / tough2.stdout
1 "Hello"\r
2 "Hello"\r
3 badCase\r
4 badCase\r
5 "Bark"\r
6 "Hello"\r
7 (1,2,3)\r
8 \r
9 \r
10  71% expressions used (68/95)\r
11  14% boolean coverage (1/7)\r
12        0% guards (0/4), 3 always True, 1 always False\r
13       33% 'if' conditions (1/3), 1 always True, 1 always False\r
14      100% qualifiers (0/0)\r
15  58% alternatives used (7/12)\r
16 100% local declarations used (0/0)\r
17  83% top-level declarations used (5/6)\r
18 \r
19 \r
20 -----<module Main>-----\r
21  71% expressions used (68/95)\r
22  14% boolean coverage (1/7)\r
23        0% guards (0/4), 3 always True, 1 always False\r
24       33% 'if' conditions (1/3), 1 always True, 1 always False\r
25      100% qualifiers (0/0)\r
26  58% alternatives used (7/12)\r
27 100% local declarations used (0/0)\r
28  83% top-level declarations used (5/6)\r
29 \r
30 \r
31 Writing: Main.hs.html\r
32 <html><style type="text/css">\r
33 span.lineno { color: white; background: #aaaaaa; border-right: solid white 12px }\r
34 span.nottickedoff { background: yellow}\r
35 span.istickedoff { background: white }\r
36 span.tickonlyfalse { margin: -1px; border: 1px solid #f20913; background: #f20913 }\r
37 span.tickonlytrue  { margin: -1px; border: 1px solid #60de51; background: #60de51 }\r
38 span.funcount { font-size: small; color: orange; z-index: 2; position: absolute; right: 20 }\r
39 span.decl { font-weight: bold }\r
40 span.spaces    { background: white }\r
41 </style>\r
42 <pre>\r
43 <span class="lineno">    1 </span>\begin{code}\r
44 <span class="lineno">    2 </span>import Control.Exception as E\r
45 <span class="lineno">    3 </span>\r
46 <span class="lineno">    4 </span>-- This test shows what hpc can really do.\r
47 <span class="lineno">    5 </span>\r
48 <span class="lineno">    6 </span><span class="decl"><span class="istickedoff">main = do</span>\r
49 <span class="lineno">    7 </span><span class="spaces">  </span><span class="istickedoff">print (&quot;Hello&quot;)</span>\r
50 <span class="lineno">    8 </span><span class="spaces">  </span><span class="istickedoff">foo &quot;Hello&quot;</span>\r
51 <span class="lineno">    9 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">44</span>))</span>\r
52 <span class="lineno">   10 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>\r
53 <span class="lineno">   11 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print (badCase 22 <span class="nottickedoff">(error &quot;Foo&quot;)</span>))</span>\r
54 <span class="lineno">   12 </span><span class="spaces">          </span><span class="istickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span>\r
55 <span class="lineno">   13 </span><span class="spaces">  </span><span class="istickedoff">E.catch (print &quot;Bark&quot;)</span>\r
56 <span class="lineno">   14 </span><span class="spaces">          </span><span class="istickedoff"><span class="nottickedoff">(\ e -&gt; print (e :: E.ErrorCall))</span></span>\r
57 <span class="lineno">   15 </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>\r
58 <span class="lineno">   16 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span>\r
59 <span class="lineno">   17 </span><span class="spaces">  </span><span class="istickedoff">() &lt;- return ()</span>\r
60 <span class="lineno">   18 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>\r
61 <span class="lineno">   19 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwoz</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>\r
62 <span class="lineno">   20 </span><span class="spaces">    </span><span class="istickedoff">_             -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>\r
63 <span class="lineno">   21 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>\r
64 <span class="lineno">   22 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> -&gt; return <span class="nottickedoff">&quot;Hello&quot;</span></span>\r
65 <span class="lineno">   23 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; <span class="nottickedoff">error &quot;Bad Thing Happened&quot;</span></span>\r
66 <span class="lineno">   24 </span><span class="spaces">  </span><span class="istickedoff">t &lt;- case <span class="nottickedoff">()</span> of</span>\r
67 <span class="lineno">   25 </span><span class="spaces">    </span><span class="istickedoff">_ | <span class="tickonlytrue">otherwise</span> </span>\r
68 <span class="lineno">   26 </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>\r
69 <span class="lineno">   27 </span><span class="spaces">    </span><span class="istickedoff">_              -&gt; return &quot;Hello&quot;</span>\r
70 <span class="lineno">   28 </span><span class="spaces">  </span><span class="istickedoff">print t</span>\r
71 <span class="lineno">   29 </span><span class="spaces">  </span><span class="istickedoff">print foo2</span></span>\r
72 <span class="lineno">   30 </span>\r
73 <span class="lineno">   31 </span><span class="decl"><span class="istickedoff">foo x = do</span>\r
74 <span class="lineno">   32 </span><span class="spaces">  </span><span class="istickedoff">print x</span>\r
75 <span class="lineno">   33 </span><span class="spaces">  </span><span class="istickedoff">return <span class="nottickedoff">()</span></span></span>\r
76 <span class="lineno">   34 </span>\r
77 <span class="lineno">   35 </span><span class="decl"><span class="nottickedoff">unused_ a = a</span></span>\r
78 <span class="lineno">   36 </span>\r
79 <span class="lineno">   37 </span>badCase :: Int -&gt; Int -&gt; Int\r
80 <span class="lineno">   38 </span><span class="decl"><span class="istickedoff">badCase a b = </span>\r
81 <span class="lineno">   39 </span><span class="spaces">        </span><span class="istickedoff">if a &gt; 100 </span>\r
82 <span class="lineno">   40 </span><span class="spaces">        </span><span class="istickedoff">then error &quot;badCase&quot; </span>\r
83 <span class="lineno">   41 </span><span class="spaces">        </span><span class="istickedoff">else if <span class="tickonlyfalse">a &gt; 1000</span> </span>\r
84 <span class="lineno">   42 </span><span class="spaces">             </span><span class="istickedoff">then <span class="nottickedoff">1</span> </span>\r
85 <span class="lineno">   43 </span><span class="spaces">             </span><span class="istickedoff">else badCase (a + 1) <span class="nottickedoff">(b - 1)</span></span></span>\r
86 <span class="lineno">   44 </span>\r
87 <span class="lineno">   45 </span>\r
88 <span class="lineno">   46 </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>\r
89 <span class="lineno">   47 </span>\r
90 <span class="lineno">   48 </span><span class="decl"><span class="istickedoff">otherwoz = True</span></span>\r
91 <span class="lineno">   49 </span>\end{code}\r
92 \r
93 </pre>\r
94 </html>\r
95 Writing: hpc_index.html\r
96 <html><style type="text/css">table.bar { background-color: #f25913; }\r
97 td.bar { background-color: #60de51;  }\r
98 td.invbar { background-color: #f25913;  }\r
99 table.dashboard { border-collapse: collapse  ; border: solid 1px black }\r
100 .dashboard td { border: solid 1px black }\r
101 .dashboard th { border: solid 1px black }\r
102 </style>\r
103 <table class="dashboard" width="100%" border=1>\r
104 <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>\r
105 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>\r
106 <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>\r
107 <tr></tr><tr style="background: #e0e0e0">\r
108 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>\r
109 <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>\r
110 </table></html>\r
111 Writing: hpc_index_fun.html\r
112 <html><style type="text/css">table.bar { background-color: #f25913; }\r
113 td.bar { background-color: #60de51;  }\r
114 td.invbar { background-color: #f25913;  }\r
115 table.dashboard { border-collapse: collapse  ; border: solid 1px black }\r
116 .dashboard td { border: solid 1px black }\r
117 .dashboard th { border: solid 1px black }\r
118 </style>\r
119 <table class="dashboard" width="100%" border=1>\r
120 <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>\r
121 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>\r
122 <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>\r
123 <tr></tr><tr style="background: #e0e0e0">\r
124 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>\r
125 <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>\r
126 </table></html>\r
127 Writing: hpc_index_alt.html\r
128 <html><style type="text/css">table.bar { background-color: #f25913; }\r
129 td.bar { background-color: #60de51;  }\r
130 td.invbar { background-color: #f25913;  }\r
131 table.dashboard { border-collapse: collapse  ; border: solid 1px black }\r
132 .dashboard td { border: solid 1px black }\r
133 .dashboard th { border: solid 1px black }\r
134 </style>\r
135 <table class="dashboard" width="100%" border=1>\r
136 <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>\r
137 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>\r
138 <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>\r
139 <tr></tr><tr style="background: #e0e0e0">\r
140 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>\r
141 <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>\r
142 </table></html>\r
143 Writing: hpc_index_exp.html\r
144 <html><style type="text/css">table.bar { background-color: #f25913; }\r
145 td.bar { background-color: #60de51;  }\r
146 td.invbar { background-color: #f25913;  }\r
147 table.dashboard { border-collapse: collapse  ; border: solid 1px black }\r
148 .dashboard td { border: solid 1px black }\r
149 .dashboard th { border: solid 1px black }\r
150 </style>\r
151 <table class="dashboard" width="100%" border=1>\r
152 <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>\r
153 <td>&nbsp;&nbsp;<tt>module <a href="Main.hs.html">Main</a></tt></td>\r
154 <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>\r
155 <tr></tr><tr style="background: #e0e0e0">\r
156 <th align=left>&nbsp;&nbsp;Program Coverage Total</tt></th>\r
157 <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>\r
158 </table></html>\r
159 \r
160 \r