nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
723 stars 121 forks source link

Add HasCallStack where error can occur #235

Closed dspies-leapyear closed 7 months ago

dspies-leapyear commented 5 years ago

When this fails due to an empty list there's no stack trace pointing to the bad "elements" call.

dspies-leapyear commented 5 years ago

@sol The error message is certainly clear, but it's not useful for debugging if elements is called in a lot of places. For debugging purposes, I'd like to know which call to elements is causing the failure without having to put trace calls everywhere or create my own elements wrapper (which is what I'm doing currently).