On Fri, Jul 17, 2009 at 10:21 AM, Wolfgang Jeltsch<g9ks1...@acme.softbase.org> wrote: > Am Freitag, 10. Juli 2009 23:41 schrieben Sie: > >> Additionally, the second equality you provide is just wrong. >> >> f *> empty = empty is no more true than f *> g = g, > > I don’t understand this. The equation f *> g = g is much more general than > f *> empty = empty. (<|>) usually denotes non-determinism and empty should be > the neutral element of non-determinism, which is failing. This leads me to > f *> empty = empty.
That's too strong, unless you want to restrict Alternative to applicative functors with reversible side-effects. It's generally accepted that LogicT IO is an instance of MonadPlus, but liftIO (putStrLn "effects!") >> mzero /= mzero I would expect LogicT IO to be an instance of Alternative as well. -- Dave Menendez <d...@zednenem.com> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe