
On 26 Apr 2016, at 15:26, Ivan Lazar Miljenovic
I may very well be wrong with this, but off the top of my head if the library is installed globally (either manually, non-sandboxed cabal-install or using stack in some fashion), then I don't think whether a particular _executable_ is compiled with a multi-/single-threaded runtime system would affect the value from a constant that's already been compiled (unless INLINE is used to prevent it being pre-computed).
That's an implementation detail that can be tackled the same way done currently with rtsSupportsBoundThreads, i.e. having it be a foreign function call rather than an actual haskell constant. That way it will always be linked with the corresponding symbol in the runtime your linking against. Cheers, Merijn