Haskell hedgehog-fn custom function generator

160 views Asked by At

When using hedgehog-fn is it possible to create function generators that generate functions meeting a specific criteria?

For example: would it be possible to have a function generator that only generates bijective functions?

1

There are 1 answers

1
Shersh On

Generating random functions is a hard task still. hedgehog-fn can't do much at the moment, see this issue:

From my experience, if you need to test against specific functions, it's better to define several functions manually and then choose one randomly.