We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wrote the MonadLogic laws up, posting them here for posterity. Happy to open a PR if desired.
MonadLogic
monadLogic :: forall m a b . ( CoArbitrary a , Arbitrary (m b) , Arbitrary a , Arbitrary (m a) , MonadPlus m , MonadLogic m , EqProp (m b) , EqProp (m (Maybe (a, m a))) , Show a , Show (m a) , Show (m b) , Function a ) => m (a, b) -> TestBatch monadLogic _ = ( "MonadLogic laws" , [ ("msplit mzero", msplit @m @a mzero =-= return Nothing) , ("msplit mplus", property $ do a <- arbitrary m <- arbitrary pure $ counterexample (show a) $ counterexample (show m) $ msplit @m @a (return a `mplus` m) =-= return (Just (a, m)) ) , ("ifte return", property $ do a <- arbitrary thf <- arbitrary let th = applyFun thf el <- arbitrary pure $ counterexample (show a) $ counterexample (show thf) $ counterexample (show el) $ ifte @m @a @b (return a) th el =-= th a ) , ("ifte mzero", property $ do thf <- arbitrary let th = applyFun thf el <- arbitrary @(m b) pure $ counterexample (show thf) $ counterexample (show el) $ ifte @m @a @b mzero th el =-= el ) , ("ifte mplus", property $ do a <- arbitrary m <- arbitrary thf <- arbitrary let th = applyFun thf el <- arbitrary @(m b) pure $ counterexample (show a) $ counterexample (show m) $ counterexample (show thf) $ counterexample (show el) $ ifte @m @a @b (return a `mplus` m) th el =-= th a `mplus` (m >>= th) ) ] )
The text was updated successfully, but these errors were encountered:
I have no qualms about adding logict as a dependency, so a PR would very likely be accepted.
logict
Sorry, something went wrong.
We stopped needing monadlogic in our project, so there is less impetus for me to get this merged.
No branches or pull requests
I wrote the
MonadLogic
laws up, posting them here for posterity. Happy to open a PR if desired.The text was updated successfully, but these errors were encountered: