reportGlobalResultsH :: ReportGlobalResults
reportGlobalResultsH arg =
    do let passed = length (rgra_passed arg)
           pending = length (rgra_pending arg)
           failed = length (rgra_failed arg)
           error = length (rgra_errors arg)
           timedOut = length (rgra_timedOut arg)
           filtered = length (rgra_filtered arg)
           total = passed + failed + error + pending
       let pendings = (if pending > 0 then colorize pendingColor else noColor) "* Pending:"
           failures = (if failed > 0 then colorize warningColor else noColor) "* Failures:"
           errors = (if error > 0 then colorize warningColor else noColor) "* Errors:"
       reportTR Info ("* Tests:     " +++ showC total +++ "\n" +++
                      "* Passed:    " +++ showC passed +++ "\n" +++
                      pendings +++ "   " +++ showC pending +++ "\n" +++
                      failures +++ "  " +++ showC failed +++ "\n" +++
                      errors +++ "    " +++ showC error +++ "\n" +++
                      "* Timed out: " +++ showC timedOut +++ "\n" +++
                      "* Filtered:  " +++ showC filtered)
       when (timedOut > 0) $
            if timedOut < 10
            then
                reportTR Info
                    ("\n" +++ noColor "* Timed out:" +++ "\n" +++ renderTestNames' (reverse (rgra_timedOut arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Timed out: (" +++ showC timedOut +++ noColor ", too many to list)")
       when (filtered > 0) $
            if filtered < 10
            then
                reportTR Info
                  ("\n" +++ noColor "* Filtered:" +++ "\n" +++ renderTestNames' (reverse (rgra_filtered arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Filtered: (" +++ showC filtered +++ noColor ", too many to list)")
       when (pending > 0) $
          reportTR Info
              ("\n" +++ pendings +++ "\n" +++ renderTestNames' (reverse (rgra_pending arg)))
       when (failed > 0) $
          reportTR Info
              ("\n" +++ failures +++ "\n" +++ renderTestNames' (reverse (rgra_failed arg)))
       when (error > 0) $
          reportTR Info
              ("\n" +++ errors +++ "\n" +++ renderTestNames' (reverse (rgra_errors arg)))
       reportStringTR Info ("\nTotal execution time: " ++ show (rgra_timeMs arg) ++ "ms")
    where
      showC x = noColor (show x)
      renderTestNames' rrs =
          noColor $ render $ nest 2 $ renderTestNames rrs
reportGlobalResultsH :: ReportGlobalResults
reportGlobalResultsH arg =
    do let passed = length (rgra_passed arg)
           pending = length (rgra_pending arg)
           failed = length (rgra_failed arg)
           error = length (rgra_errors arg)
           timedOut = length (rgra_timedOut arg)
           filtered = length (rgra_filtered arg)
           total = passed + failed + error + pending
       let pendings = (if pending > 0 then colorize pendingColor else noColor) "* Pending:"
           failures = (if failed > 0 then colorize warningColor else noColor) "* Failures:"
           errors = (if error > 0 then colorize warningColor else noColor) "* Errors:"
       reportTR Info ("* Tests:     " +++ showC total +++ "\n" +++
                      "* Passed:    " +++ showC passed +++ "\n" +++
                      pendings +++ "   " +++ showC pending +++ "\n" +++
                      failures +++ "  " +++ showC failed +++ "\n" +++
                      errors +++ "    " +++ showC error +++ "\n" +++
                      "* Timed out: " +++ showC timedOut +++ "\n" +++
                      "* Filtered:  " +++ showC filtered)
       when (timedOut > 0) $
            if timedOut < 10
            then
                reportTR Info
                    ("\n" +++ noColor "* Timed out:" +++ "\n" +++ renderTestNames' (reverse (rgra_timedOut arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Timed out: (" +++ showC timedOut +++ noColor ", too many to list)")
       when (filtered > 0) $
            if filtered < 10
            then
                reportTR Info
                  ("\n" +++ noColor "* Filtered:" +++ "\n" +++ renderTestNames' (reverse (rgra_filtered arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Filtered: (" +++ showC filtered +++ noColor ", too many to list)")
       when (pending > 0) $
          reportTR Info
              ("\n" +++ pendings +++ "\n" +++ renderTestNames' (reverse (rgra_pending arg)))
       when (failed > 0) $
          reportTR Info
              ("\n" +++ failures +++ "\n" +++ renderTestNames' (reverse (rgra_failed arg)))
       when (error > 0) $
          reportTR Info
              ("\n" +++ errors +++ "\n" +++ renderTestNames' (reverse (rgra_errors arg)))
       reportStringTR Info ("\nTotal execution time: " ++ show (rgra_timeMs arg) ++ "ms")
    where
      showC x = noColor (show x)
      renderTestNames' rrs =
          noColor $ render $ nest 2 $ renderTestNames rrs
reportGlobalResultsH arg =
    do let passed = length (rgra_passed arg)
           pending = length (rgra_pending arg)
           failed = length (rgra_failed arg)
           error = length (rgra_errors arg)
           timedOut = length (rgra_timedOut arg)
           filtered = length (rgra_filtered arg)
           total = passed + failed + error + pending
       let pendings = (if pending > 0 then colorize pendingColor else noColor) "* Pending:"
           failures = (if failed > 0 then colorize warningColor else noColor) "* Failures:"
           errors = (if error > 0 then colorize warningColor else noColor) "* Errors:"
       reportTR Info ("* Tests:     " +++ showC total +++ "\n" +++
                      "* Passed:    " +++ showC passed +++ "\n" +++
                      pendings +++ "   " +++ showC pending +++ "\n" +++
                      failures +++ "  " +++ showC failed +++ "\n" +++
                      errors +++ "    " +++ showC error +++ "\n" +++
                      "* Timed out: " +++ showC timedOut +++ "\n" +++
                      "* Filtered:  " +++ showC filtered)
       when (timedOut > 0) $
            if timedOut < 10
            then
                reportTR Info
                    ("\n" +++ noColor "* Timed out:" +++ "\n" +++ renderTestNames' (reverse (rgra_timedOut arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Timed out: (" +++ showC timedOut +++ noColor ", too many to list)")
       when (filtered > 0) $
            if filtered < 10
            then
                reportTR Info
                  ("\n" +++ noColor "* Filtered:" +++ "\n" +++ renderTestNames' (reverse (rgra_filtered arg)))
            else
                reportTR Info
                  ("\n" +++ noColor "* Filtered: (" +++ showC filtered +++ noColor ", too many to list)")
       when (pending > 0) $
          reportTR Info
              ("\n" +++ pendings +++ "\n" +++ renderTestNames' (reverse (rgra_pending arg)))
       when (failed > 0) $
          reportTR Info
              ("\n" +++ failures +++ "\n" +++ renderTestNames' (reverse (rgra_failed arg)))
       when (error > 0) $
          reportTR Info
              ("\n" +++ errors +++ "\n" +++ renderTestNames' (reverse (rgra_errors arg)))
       reportStringTR Info ("\nTotal execution time: " ++ show (rgra_timeMs arg) ++ "ms")
    where
      showC x = noColor (show x)
      renderTestNames' rrs =
          noColor $ render $ nest 2 $ renderTestNames rrs