The unix package has:
--- | A set of signals reserved for use by the implementation. In GHC, this will normally
--- include either `sigVTALRM` or `sigALRM`.
reservedSignals :: SignalSet
reservedSignals = addSignal rtsTimerSignal emptySignalSet
foreign import ccall rtsTimerSignal :: CInt
In MR !15757 we remove the signal-based timer/ticker implementations. This means that for GHC at least, there are no reserved signals. And the RTS will want to drop its exported function rtsTimerSignal, since it is now meaningless. The unix package is its only user (afaics).
Since presumably the unix package wants to support a range of ghc versions, then all we need is a bit of cpp:
--- | A set of signals reserved for use by the implementation. In GHC, this will normally
--- include either `sigVTALRM` or `sigALRM`.
+-- | A set of signals reserved for use by the implementation. In GHC prior to
+-- version 10, this will normally include either `sigVTALRM` or `sigALRM`.
+-- In GHC 10 it is empty.
reservedSignals :: SignalSet
+#if __GLASGOW_HASKELL__ >= 1000
+reservedSignals = emptySignalSet
+#else
reservedSignals = addSignal rtsTimerSignal emptySignalSet
foreign import ccall rtsTimerSignal :: CInt
+#endif
The unix package has:
In MR !15757 we remove the signal-based timer/ticker implementations. This means that for GHC at least, there are no reserved signals. And the RTS will want to drop its exported function
rtsTimerSignal, since it is now meaningless. The unix package is its only user (afaics).Since presumably the unix package wants to support a range of ghc versions, then all we need is a bit of cpp: