reportTestResultHS :: ReportTestResult
reportTestResultHS ftr =
    let res = rr_result (ft_payload ftr)
        msg = attachCallStack (rr_message (ft_payload ftr)) (rr_stack (ft_payload ftr))
    in case res of
         Pass ->
             reportMessage Debug msg okSuffix
         Pending ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg pendingSuffix
         Fail ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg failureSuffix
         Error ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg errorSuffix
   where
     reportHumanTestStartMessageIfNeeded =
         do tc <- ask
            when (tc_quiet tc) (reportHumanTestStartMessage Info ftr)
     reportMessage level msg suffix =
         reportTR level (ensureNewlineColorString msg +++ suffix +++ noColor timeStr)
     timeStr = " (" ++ show (rr_wallTimeMs (ft_payload ftr)) ++ "ms)\n"
     failureSuffix = colorize warningColor "*** Failed!"
     errorSuffix = colorize warningColor "@@@ Error!"
     pendingSuffix = colorize pendingColor "^^^ Pending!"
     okSuffix = colorize testOkColor  "+++ OK"

-- parallel
reportTestResultHS :: ReportTestResult
reportTestResultHS ftr =
    let res = rr_result (ft_payload ftr)
        msg = attachCallStack (rr_message (ft_payload ftr)) (rr_stack (ft_payload ftr))
    in case res of
         Pass ->
             reportMessage Debug msg okSuffix
         Pending ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg pendingSuffix
         Fail ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg failureSuffix
         Error ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg errorSuffix
   where
     reportHumanTestStartMessageIfNeeded =
         do tc <- ask
            when (tc_quiet tc) (reportHumanTestStartMessage Info ftr)
     reportMessage level msg suffix =
         reportTR level (ensureNewlineColorString msg +++ suffix +++ noColor timeStr)
     timeStr = " (" ++ show (rr_wallTimeMs (ft_payload ftr)) ++ "ms)\n"
     failureSuffix = colorize warningColor "*** Failed!"
     errorSuffix = colorize warningColor "@@@ Error!"
     pendingSuffix = colorize pendingColor "^^^ Pending!"
     okSuffix = colorize testOkColor  "+++ OK"

-- parallel
reportTestResultHS ftr =
    let res = rr_result (ft_payload ftr)
        msg = attachCallStack (rr_message (ft_payload ftr)) (rr_stack (ft_payload ftr))
    in case res of
         Pass ->
             reportMessage Debug msg okSuffix
         Pending ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg pendingSuffix
         Fail ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg failureSuffix
         Error ->
             do reportHumanTestStartMessageIfNeeded
                reportMessage Info msg errorSuffix
   where
     reportHumanTestStartMessageIfNeeded =
         do tc <- ask
            when (tc_quiet tc) (reportHumanTestStartMessage Info ftr)
     reportMessage level msg suffix =
         reportTR level (ensureNewlineColorString msg +++ suffix +++ noColor timeStr)
     timeStr = " (" ++ show (rr_wallTimeMs (ft_payload ftr)) ++ "ms)\n"
     failureSuffix = colorize warningColor "*** Failed!"
     errorSuffix = colorize warningColor "@@@ Error!"
     pendingSuffix = colorize pendingColor "^^^ Pending!"
     okSuffix = colorize testOkColor  "+++ OK"

-- parallel