
I would propose adding a Bool value to base that indicates whether the code was compiled/linked with the threaded or single threaded runtime system. A library might want to implement certain functionality differently depending on whether the threaded runtime system is used (i.e. avoid blocking C FFI calls in single-threaded). There is currently no good way to do this. StackExchange currently suggests using "Control.Concurrent.rtsSupportsBoundThreads" for this, which is defined as: HsBool rtsSupportsBoundThreads(void) { #if defined(THREADED_RTS) return HS_BOOL_TRUE; #else return HS_BOOL_FALSE; #endif } But it seems undesirable to conflate support for bound threads and use of the threaded runtime system? Especially since this would be a trivial addition to Control.Concurrent (i.e. simply an ifdef'ed True/False constant). Cheers, Merijn