Hacker News new | past | comments | ask | show | jobs | submit login

I don't think Hughes is talking about writing the implementation of the generators. He's talking about writing then down in your tests, e.g.

    ?FORALL(N,int(),
    ?FORALL(M,int(),
      N+M==M+N)).
In Haskell you can specify the `int()`'s in the type instead of in the code. What I think Hughes is saying is that for real world testing scenarios, the standard type generators aren't fine grained enough. For example, you need to specify `positiveint()`, or `elementinlist(L)`.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: