readAndClearLogRef :: LogRef -> GhcMod String
readAndClearLogRef (LogRef ref) = do
    b <- liftIO $ readIORef ref
    liftIO $ writeIORef ref id
    convert' (b [])
readAndClearLogRef :: LogRef -> GhcMod String
readAndClearLogRef (LogRef ref) = do
    b <- liftIO $ readIORef ref
    liftIO $ writeIORef ref id
    convert' (b [])
readAndClearLogRef (LogRef ref) = do
    b <- liftIO $ readIORef ref
    liftIO $ writeIORef ref id
    convert' (b [])