News for hackers. Stuff that matters.
Re:Using Haskell's QuickCheck for Python by cpa on Saturday March 21, 2015 @05:31AM (#9242251)
Neat, but there's a subtelty: at the end of the article, we only proved that square is error-free[0] when given an Int as input (because the haskell version of square is Int -> IO Int). But Python being loosely typed, I could call square on a float, and in this case nothing can be said of the python function.

Also, you have to make sure haskell's Ints and Python's Int are the same on your platform (one could be 32 bits and the other 64 bits).

[0] we did not prove anything, but just ran a bunch of tests, but you get the point.

Re:Using Haskell's QuickCheck for Python by Ded7xSEoPKYNsDd on Saturday March 21, 2015 @07:03AM (#9242399)
> Also, you have to make sure haskell's Ints and Python's Int are the same on your platform (one could be 32 bits and the other 64 bits).

Aren't they both infinite-resolution?

Re:Using Haskell's QuickCheck for Python by DRMacIver on Saturday March 21, 2015 @07:39AM (#9242471)
No, the infinite precision integer type in Haskell is called Integer. Int is a platform dependent fixed size int.