registry-hedgehog-0.7.0.2: utilities to work with Hedgehog generators and `registry`
Safe HaskellNone
LanguageHaskell2010

Data.Registry.Hedgehog.TH

Synopsis

Documentation

makeGenerators :: Name -> ExpQ Source #

Make a registry containing generators for an ADT We want to generate the following

fun genEmployeeStatus <: genFun (tag "permanent" Permanent) <: genFun (tag "temporary" Temporary)

genEmployeeStatus :: Gen Chooser -> Gen (Tag "permanent" EmployeeStatus) -> Gen (Tag "temporary" EmployeeStatus) -> Gen EmployeeStatus genEmployeeStatus chooser g1 g2 = chooseOne chooser [fmap unTag1, fmap unTag g2]