Re: runST $ unsafeIOToST $ ioWhatever
Henning Thielemann <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <[email protected]> |
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'. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.