@Janis > What you do is essentially the standard Haskell QuickCheck way of > generating recursive trees, right? Except that you bound the number of > levels, whereas they bound the size (number of nodes). > Yes, that is accurate. I devised my implementation without knowing about this aspect of QuickCheck, but it's a fairly obvious solution.
> The “pattern” here would be the sized combinator. Maybe that is something > that would be valuable to add to elm-test for such situations? > > Note that the size parameter in QuickCheck also affects other generators. > So maybe that would motivate a general overhaul of elm-test‘s Fuzz module. > This seems worth exploring, but it doesn't look like it justifies a major change in interface. The implementation of Fuzzer is opaque so I have some freedom there. However, I'm already planning to implement Fuzzers as rosetrees, which will allow shrinking when mapping, andMap, and possibly andThen. If I had to choose, the advanced maps seem more useful, even if a rosetree implementation precludes *sized*. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
