Created
March 19, 2013 18:42
-
-
Save joshcough/5198909 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
instance Arbitrary Assoc where | |
arbitrary = Test.QuickCheck.elements [L, R, N] | |
genPrecedence = choose (0, 9) :: Gen Int | |
instance Arbitrary Fixity where | |
arbitrary = | |
oneof [ liftM2 Infix arbitrary genPrecedence, | |
liftM Prefix genPrecedence, | |
liftM Postfix genPrecedence, | |
return Idfix ] | |
prop_pack_unpack_fixity f = (unpackFixity . packFixity) f == f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment