Last active
February 10, 2017 12:25
-
-
Save deque-blog/7e24f715cbbc748964b2a5b546de9475 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildTree :: Shrink a -> a -> Tree a | |
buildTree shrinker = build where | |
build x = Tree x (map build (shrinker x)) | |
addCounterExample :: (Show a) => a -> Tree Result -> Tree Result | |
addCounterExample arg = fmap (\r -> overFailure r addToFailure) | |
where addToFailure f = f { counterExample = show arg : counterExample f } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment