ocalMin' st res (t:ts) =
  do -- CALLBACK before_test
    MkRose res' ts' <- protectRose (reduceRose t)
    callbackPostTest st res'
    if ok res' == Just False
      then localMin st{ S.numSuccessShrinks = S.numSuccessShrinks st + 1,
                        S.numTryShrinks     = 0 } res' res ts'
      else localMin st{ S.numTryShrinks    = S.numTryShrinks st + 1,
                        S.numTotTryShrinks = S.numTotTryShrinks st + 1 } res res ts

localMin' st res (t:ts) =
  do -- CALLBACK before_test
    MkRose res' ts' <- protectRose (reduceRose t)
    callbackPostTest st res'
    if ok res' == Just False
      then localMin st{ S.numSuccessShrinks = S.numSuccessShrinks st + 1,
                        S.numTryShrinks     = 0 } res' res ts'
      else localMin st{ S.numTryShrinks    = S.numTryShrinks st + 1,
                        S.numTotTryShrinks = S.numTotTryShrinks st + 1 } res res ts
localMin' st res (t:ts) =
  do -- CALLBACK before_test
    MkRose res' ts' <- protectRose (reduceRose t)
    callbackPostTest st res'
    if ok res' == Just False
      then localMin st{ S.numSuccessShrinks = S.numSuccessShrinks st + 1,
                        S.numTryShrinks     = 0 } res' res ts'
      else localMin st{ S.numTryShrinks    = S.numTryShrinks st + 1,
                        S.numTotTryShrinks = S.numTotTryShrinks st + 1 } res res ts