ANN: smallcheck-series-0.1

4 views
Skip to first unread message

Danny Navarro

unread,
Apr 27, 2015, 11:15:31 AM4/27/15
to haskel...@googlegroups.com, Roman Cheplyaka
I just released the first version of `smallcheck-series` with some
utilities to create smallcheck series for `Text` and `ByteString`:

https://hackage.haskell.org/package/smallcheck-series-0.1

Right now, the functionality is enough to scratch my own itch, but I
expect to be adding soon series for `containers` and more exhaustive
series for `Text`.

PS: This package doesn't have much to do with `tasty` directly but
since I think most people using `smallcheck` are already using
`tasty`, I guess this mailing list should be fine for the
announcement.

--
Danny Navarro | http://dannynavarro.net

Roman Cheplyaka

unread,
Apr 27, 2015, 3:32:11 PM4/27/15
to Danny Navarro, haskel...@googlegroups.com
Great job, Danny!

A couple of remarks:

1. I don't think 'ascii' is a good name for what it's defined to be,
especially in the ByteString module. That has nothing at all to do with
ascii.

2. A series should try not to produce identical elements like
'enumerated' does. Doing so is just a waste of CPU time; This makes
smallcheck check the same property several times on the same input
value. A better (and simpler!) way to implement this is the standard
'inits' function from Data.List.

Roman

Danny Navarro

unread,
Apr 27, 2015, 4:47:27 PM4/27/15
to Roman Cheplyaka, haskel...@googlegroups.com

Thanks, Roman, for taking the time to review it.

On Apr 27, 2015 9:32 PM, "Roman Cheplyaka" <ro...@ro-che.info> wrote:
>
> On 27/04/15 18:15, Danny Navarro wrote:
> > I just released the first version of `smallcheck-series` with some
> > utilities to create smallcheck series for `Text` and `ByteString`:
> >
> > https://hackage.haskell.org/package/smallcheck-series-0.1
> >
> > Right now, the functionality is enough to scratch my own itch, but I
> > expect to be adding soon series for `containers` and more exhaustive
> > series for `Text`.
> >
> > PS: This package doesn't have much to do with `tasty` directly but
> > since I think most people using `smallcheck` are already using
> > `tasty`,  I guess this mailing list should be fine for the
> > announcement.
>
> Great job, Danny!
>
> A couple of remarks:
>
> 1. I don't think 'ascii' is a good name for what it's defined to be,
> especially in the ByteString module. That has nothing at all to do with
> ascii.

I was trying to maintain naming consistency across modules but in the end I see that most names look confusing. I'll try to come up with better names, not only for ascii.

>
> 2. A series should try not to produce identical elements like
> 'enumerated' does. Doing so is just a waste of CPU time; This makes
> smallcheck check the same property several times on the same input
> value. A better (and simpler!) way to implement this is the standard
> 'inits' function from Data.List.

That's a mistake I'll fix right away. For some reason I assumed smallcheck stopped going deeper when the next element was identical.

>
> Roman
>
> --
> You received this message because you are subscribed to the Google Groups "tasty" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to haskell-tast...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Danny Navarro

unread,
Apr 28, 2015, 9:31:42 AM4/28/15
to Roman Cheplyaka, haskel...@googlegroups.com
I just uploaded version `smallcheck-series-0.2`:
https://hackage.haskell.org/package/smallcheck-series-0.2

I did a general renaming to make function names more boring but,
hopefully, clearer.

I also took care of the identical elements issue.
Reply all
Reply to author
Forward
0 new messages