[Haskell-cafe] runST $ unsafeIOToST $ ioWhatever
Henning Thielemann
lemming at henning-thielemann.de
Sun Apr 14 19:56:16 UTC 2024
On Sun, 14 Apr 2024, Folsk Pratima wrote:
> strError :: Int -> String
> strError errnum = runST $ unsafeIOToST ioString
Instead of (runST $ unsafeIOToST ioString) you could just call
(unsafePerformIO ioString).
However, ioString must not have observable side effects. throwIO does not
look right and should be 'error'.
More information about the Haskell-Cafe
mailing list