You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst looking at OptionT today and adding some tests in #692, I noticed that the OptionT has a MonadCombine instance, plus implementations for empty and combine.
The tests exercise MonadCombineTests.monad instead of MonadCombineTests.monadCombine, which means that the implementations of empty and combine are not tested against the laws (or anything).
I briefly looked at increasing the test to monadCombine, but the current implementation of OptionT does not pass the laws, at least not for OptionT[List, Int].
I noticed that #687 proposes to remove, at least temporarily, the MonadCombine for XorT - if a similar approach is warranted here I can take a look. By similiar in this instance, I mean that it might make sense to reduce the implementation to Monad until the laws pass.
The text was updated successfully, but these errors were encountered:
mikejcurry
changed the title
OptionT implements MonadCombine, but doesn't meet the laws
OptionT implements MonadCombine, but doesn't meet the laws
Nov 21, 2015
Whilst looking at
OptionT
today and adding some tests in #692, I noticed that theOptionT
has aMonadCombine
instance, plus implementations for empty and combine.The tests exercise
MonadCombineTests.monad
instead ofMonadCombineTests.monadCombine
, which means that the implementations ofempty
andcombine
are not tested against the laws (or anything).I briefly looked at increasing the test to
monadCombine
, but the current implementation ofOptionT
does not pass the laws, at least not forOptionT[List, Int]
.I noticed that #687 proposes to remove, at least temporarily, the
MonadCombine
forXorT
- if a similar approach is warranted here I can take a look. By similiar in this instance, I mean that it might make sense to reduce the implementation toMonad
until the laws pass.The text was updated successfully, but these errors were encountered: