Created
March 18, 2015 17:42
-
-
Save teh/dd684c31cbc226dedb3e to your computer and use it in GitHub Desktop.
This file contains 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
module Main where | |
import Python | |
import Test.QuickCheck | |
import Test.QuickCheck.Monadic | |
square :: Int -> IO Int | |
square = defVV "export = lambda x: x * x" | |
main = do | |
quickCheck $ monadicIO $ do | |
v <- pick arbitrary | |
r <- run $ square v | |
assert $ r == v * v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment