> In my program I observe that, with -O2 flag turned on, > Program 1 behaves > like Program 2. And without O2, their outputs are different. > > Is it the desirable behaviour? For my program, I did not expect the > optimizer to do this transformation.
-O2 should not change the behaviour of the program, except where the behaviour is dependent on external factors (eg. I/O) or when the program uses unsafePerformIO. If that's not the case, could you send us the code so we can take a look? Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users