{-# htermination threadToIOResult :: IO a -> IOResult #-}