[QuickCheck] QuickCheck request - Gen newtype constructors not exported by top level module

Nick Smallbone nick.smallbone at gmail.com
Wed Oct 30 21:15:03 GMT 2013


Hi Mitchell,

On Tuesday 08 October, 2013 at 10:25 am, Mitchell Rosen wrote:
> The Gen newtype should probably have its constructors exported by the top
> level module. Right now, from just looking at the top level documentation,
> a Gen looks like a "data" with no exported constructors. This is pretty
> confusing, because all hyperlinks from the top level module also resolve to
> this type. You can only see that a Gen is nothing more than a newtype if
> you make your way to the Test.QuickCheck.Gen module.

This is somewhat deliberate on our part, because we want QuickCheck to
define enough combinators that you don't need to look inside a Gen.
If you do, then we should maybe add a new combinator. Did you need to
poke inside Gen for some reason or was it just curiosity?

Nick



More information about the QuickCheck mailing list