Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created March 19, 2013 18:42
Show Gist options
  • Save joshcough/5198909 to your computer and use it in GitHub Desktop.
Save joshcough/5198909 to your computer and use it in GitHub Desktop.
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