nick8325 / quickcheck

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

Fix GHC 8.8 build: remove fail from Monad instance for newer GHCs #255

Closed Bodigrim closed 5 years ago

phadej commented 5 years ago

Conditional should be on MIN_VERSION_base(4,13,0)

On 27 Apr 2019, at 20.33, Bodigrim notifications@github.com wrote:

You can view, comment on, or merge this pull request online at:

https://github.com/nick8325/quickcheck/pull/255

Commit Summary

Remove fail from Monad instance for newer GHCs File Changes

M Test/QuickCheck/Monadic.hs (2) Patch Links:

https://github.com/nick8325/quickcheck/pull/255.patch https://github.com/nick8325/quickcheck/pull/255.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Bodigrim commented 5 years ago

Conditional should be on MIN_VERSION_base(4,13,0)

To be 100% compatible - yes. But it makes the logic of conditionals harder to grasp. AFAIU as long as all usages of PropertyM go through monadicIO / assert pattern, it does not change semantics.

phadej commented 5 years ago

It does change the public interface, and as you propose it, it’s breaking change.

fail records the reason (assert only says ”Assertion failed”), so I’d expect it’s used to greater extend in the users testing code.

On 27 Apr 2019, at 22.07, Bodigrim notifications@github.com wrote:

Conditional should be on MIN_VERSION_base(4,13,0)

To be 100% compatible - yes. But it makes the logic of conditionals harder to grasp and is out of line with the rest of the module. AFAIU as long as all usages of PropertyM goes through monadicIO / assert pattern, it does not change semantics.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Bodigrim commented 5 years ago

Agreed, makes sense.

nick8325 commented 5 years ago

Thanks!