Skip to content

Instantly share code, notes, and snippets.

@teh
Created March 18, 2015 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teh/dd684c31cbc226dedb3e to your computer and use it in GitHub Desktop.
Save teh/dd684c31cbc226dedb3e to your computer and use it in GitHub Desktop.
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