On Sun, Jun 8, 2014 at 1:56 AM, Rafael Almeida <almeidaraf@gmail.com> wrote:
Let's say we want to quickcheck the function !!. Passing a negative index to it is an error. However, how can you make a check that it indeed errors in such situation?

The problem is that (!!) is a partial function, like head. How would you check that head [] is an error?

What you could do is quickcheck a safe version of (!!) -- see Safe.atMay -- that returns a Maybefied type.

-- Kim-Ee