nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
724 stars 121 forks source link

Combinators for products #191

Closed Lysxia closed 6 years ago

Lysxia commented 6 years ago

Resolves #155

nick8325 commented 6 years ago

Hmm, I like the functionality but I'm not sure about the name now (since it doesn't generate a product). I'm going to try and think of a better name (bikeshedding). Suggestions welcome!

Lysxia commented 6 years ago

Sure! How about arbitraryConstructor or arbitraryVariant?

nick8325 commented 6 years ago

It can be used to apply an arbitrary function though, not just a constructor.

How about liftArbitrary2 etc. by analogy with liftM2 and liftA2?

phadej commented 6 years ago

liftArbitrary is used by Arbitrary1, unfortunately

Sent from my iPhone

On 6 Jan 2018, at 0.16, Nick Smallbone notifications@github.com wrote:

It can be used to apply an arbitrary function though, not just a constructor.

How about liftArbitrary2 etc. by analogy with liftM2 and liftA2?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nick8325 commented 6 years ago

Ah, that's unfortunate. My first thought had been arbitrary2, which fails for the same reason :)

How about arbitraryApply2, then?

Lysxia commented 6 years ago

I like arbitraryApply2!

nick8325 commented 6 years ago

I renamed to arbitraryApply2/3 and added an arity-4 version.

nick8325 commented 6 years ago

But I may do further bikeshedding if I think of a better name :)

Lysxia commented 6 years ago

Great!