impureCmd :: (Worker -> IO a) -> History -> a
impureCmd w hist =
    unsafePerformIO $ do worker <- getWorker False hist
                         res <- w worker
                         killWorker worker
                         return res
impureCmd :: (Worker -> IO a) -> History -> a
impureCmd w hist =
    unsafePerformIO $ do worker <- getWorker False hist
                         res <- w worker
                         killWorker worker
                         return res
impureCmd w hist =
    unsafePerformIO $ do worker <- getWorker False hist
                         res <- w worker
                         killWorker worker
                         return res