On 26 March 2012 20:33, Ting Lei <[email protected]> wrote: > can :: (MonadPlus m) => (a -> m b) -> a -> Bool > can f x = case f x of > mzero -> False > _ -> True
In the first pattern `mzero' is just a variable and matches anything, as does `_'. So, naturally, both patterns overlap. I don't see any way to write this without requiring `Eq m'. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
