"Hello" "Hello" badCase badCase "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) ---------- 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
    1 import Control.Exception as E
    2 
    3 -- This test shows what hpc can really do.
    4 
    5 main = do
    6   print ("Hello")
    7   foo "Hello"
    8   E.catch (print (badCase 22 44))
    9           (\ e -> print (e :: E.ErrorCall))
   10   E.catch (print (badCase 22 (error "Foo")))
   11           (\ e -> print (e :: E.ErrorCall))
   12   E.catch (print "Bark")
   13           (\ e -> print (e :: E.ErrorCall))
   14   (_,_) <- return $ ("Hello","World")
   15   return ()
   16   () <- return ()
   17   t <- case () of
   18     _ | otherwoz -> return "Hello"
   19     _             -> error "Bad Thing Happened"
   20   t <- case () of
   21     _ | otherwise -> return "Hello"
   22     _              -> error "Bad Thing Happened"
   23   t <- case () of
   24     _ | otherwise 
   25       , False      -> error "Bad Thing Happened"
   26     _              -> return "Hello"
   27   print t
   28   print foo2
   29 
   30 foo x = do
   31   print x
   32   return ()
   33 
   34 unused_ a = a
   35 
   36 badCase :: Int -> Int -> Int
   37 badCase a b = 
   38         if a > 100 
   39         then error "badCase" 
   40         else if a > 1000 
   41              then 1 
   42              else badCase (a + 1) (b - 1)
   43 
   44 
   45 foo2 = (1,2, if True then 3 else 4)
   46 
   47 otherwoz = True

Writing: hpc_index.html
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main 83%5/6
58%7/12
71%68/95
  Program Coverage Total 83%5/6
58%7/12
71%68/95
Writing: hpc_index_fun.html
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main 83%5/6
58%7/12
71%68/95
  Program Coverage Total 83%5/6
58%7/12
71%68/95
Writing: hpc_index_alt.html
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main 83%5/6
58%7/12
71%68/95
  Program Coverage Total 83%5/6
58%7/12
71%68/95
Writing: hpc_index_exp.html
moduleTop Level DefinitionsAlternativesExpressions
%covered / total%covered / total%covered / total
  module Main 83%5/6
58%7/12
71%68/95
  Program Coverage Total 83%5/6
58%7/12
71%68/95