[Haskell-cafe] How to create a list of each constructor value

PICCA Frederic-Emmanuel frederic-emmanuel.picca at synchrotron-soleil.fr
Wed Nov 30 15:36:25 UTC 2022


> Also, you can simplify the "map pure (...)" by using `elements` :)

thanks

another question I have plenty of instance build like this

instance Arbitrary TypeA where
    arbitrary = TypeA <$> arbitrary <*> arbitrary ... <*> arbitrary

is there a convenient way to avoid typing this it seems purely mechanical

thanks

Fred


More information about the Haskell-Cafe mailing list