hspec/hspec — pull request #200 by junjihashimoto (2014-10-21 03:54:56+00:00)
Title: Add retryWith

Add retryWith-function.
(Our test partially fails sometime by the system's condition. so I add this.)

When test is failed, this function retry the test until the count = 1.
This function's test is in "hspec / example / Spec.hs".

I want to write the test on "test/Test/Hspec/Core/TypeSpec.hs",
But the code causes following compilation error.
I do not know why Spec.hs is ok and TypeSpec.hs is not good.
I can not find the solution.

```
test/Test/Hspec/Core/TypeSpec.hs:140:7:
No instance for (Example (Test.Hspec.Core.Type.Retry Expectation))
arising from a use of ‘it’
In the expression: it "retry"
In a stmt of a 'do' block:
it "retry"
$ do { let incr :: IO Int
incr = ...;
H.retryWith 11 $ do { incr `shouldReturn` (10 :: Int) } }
In the second argument of ‘($)’, namely
‘do { ref <- runIO $ newIORef (0 :: Int);
it "retry"
$ do { let ...;
H.retryWith 11 $ do { ... } } }’
```