As usual, it depends on what aspects of behavior you consider important. As an obvious example, if the two produce (or store) distinct structures that are (==), that should be fine. Similarly, if the effects are different in a way that does not matter to your application (e.g., one may buffer more input than the other, or they may read from the same files in different orders, or they may produce the same images on screen using different graphics operations) then that should be fine too.
Hello, I have such a question: assume you have some type `T` which has Applicative and Monad instances. Is it ok if code like this:foo :: Int -> T Stringbar :: Int -> T Int(,) <$> foo 10 <*> bar "20"behaves not like this code:foobar = dox <- foo 10y <- bar "20"return (x, y)The word "behaves" I mean not just returning value but the effect performed also.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe