G'day all. I wrote:
> > My feeling is that do { p <- xs; return e } should behave identically > > (modulo the precise error message if the pattern match fails) to > > map (\p -> e) xs. Your proposal would make it into a map/filter > > hybrid. Which, of course, it is now. I blame lack of caffeine. Quoting Cale Gibbard <[EMAIL PROTECTED]>: > Okay, so how about we separate these? > > do {p <- e; stmts} = e >>= \p -> do {stmts} > do {p <-: e; stmts} = let ok p = do {stmts}; ok _ = mzero in e >>= ok > (note the new symbol for monadically failing pattern match) Not happy. If anything, it should be the former which gets the new symbol, to make it the same as list comprehensions. But this would break backwards compatibility. Cheers, Andrew Bromage _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell