
Hi,
If I have a Haskell wrapper (with unsafe...) over a function that's never going to return different values and is always side-effect free, but can change depending on compile time options of its library; my program is running, and then the version of my library is updated by my distribution smart instalation system, which does update versions of libraries in use; is it possible that I get a wrong behavior of my program?
I do not understand enough about package management to understand how running programs or libraries are updated, and less about how linking works between Haskelll and libraries on other languages, so I don't know if my program is guaranteed to stay with a single version of a library for each run.
(Sure this is a weird situation, but I do like to think about worst cases.)
In practice that is fine, with current RTSes and so on.
In principle it's not fine. A 'constant' should be constant over all time, not just constant over a particular library version or sub-version or a particular program invocation or OS or....
Who knows, maybe some future haskell runtime will be able to perform the trickery you describe and will cause this to break ;)
What I actually want to use that way are build time configs. For instance, 'isThisLibraryThreadSafe' or 'maximumNumberOfBigObjects'. Actually, I don't know why people allow build time options at all. We always use the "best set of options", and the alternatives are there just to compel us to check for them :) MaurĂcio