[Haskell-cafe] Serialization of (a -> b) and IO a
sjoerd at w3future.com
Thu Nov 11 12:56:00 EST 2010
On Nov 11, 2010, at 6:34 PM, John Lato wrote:
> I don't know to what extent it would apply in this hypothetical situation, but ghc (and probably other compilers) rely upon Haskell's semantics in performing various code transformations. If you break the semantics some transformations become invalid, resulting in incorrect code.
> I've experienced this with code that violated ref. transparency. The program behavior changed depending on the compiler's optimization settings. I'm not keen to go back to that.
Then don't do that. Being able to serialize functions is just as dangerous as having unsafePerformIO. If you don't use it, you don't have problems.
More information about the Haskell-Cafe