heckString :: Parser String -> String -> (Char -> Char -> Bool) ->
               String -> String -> Property
checkString p a' test l s' = checkParser p (w a' 0 s') s'
  where w [] _ []    = Right a'
        w [] i (s:_) = posErr i s' [uneCh s, exEof]
        w _  0 []    = posErr 0 s' [uneEof, exSpec l]
        w _  i []    = posErr 0 s' [uneStr (take i s'), exSpec l]
        w (a:as) i (s:ss)
          | test a s  = w as i' ss
          | otherwise = posErr 0 s' [uneStr (take i' s'), exSpec l]
            where i'  = succ i

checkString :: Parser String -> String -> (Char -> Char -> Bool) ->
               String -> String -> Property
checkString p a' test l s' = checkParser p (w a' 0 s') s'
  where w [] _ []    = Right a'
        w [] i (s:_) = posErr i s' [uneCh s, exEof]
        w _  0 []    = posErr 0 s' [uneEof, exSpec l]
        w _  i []    = posErr 0 s' [uneStr (take i s'), exSpec l]
        w (a:as) i (s:ss)
          | test a s  = w as i' ss
          | otherwise = posErr 0 s' [uneStr (take i' s'), exSpec l]
            where i'  = succ i
checkString p a' test l s' = checkParser p (w a' 0 s') s'
  where w [] _ []    = Right a'
        w [] i (s:_) = posErr i s' [uneCh s, exEof]
        w _  0 []    = posErr 0 s' [uneEof, exSpec l]
        w _  i []    = posErr 0 s' [uneStr (take i s'), exSpec l]
        w (a:as) i (s:ss)
          | test a s  = w as i' ss
          | otherwise = posErr 0 s' [uneStr (take i' s'), exSpec l]
            where i'  = succ i