tServerMessage :: Config -> WS.Connection -> IO ServerMessage
getServerMessage config conn = do
    msg <- WS.receiveData conn
    case readMaybe (T.unpack msg) of
        Just msg -> do
            when (debug config) $
                putStrLn $ "← " ++ show msg
            return msg
        Nothing -> fail "Invalid server message"

jo
getServerMessage :: Config -> WS.Connection -> IO ServerMessage
getServerMessage config conn = do
    msg <- WS.receiveData conn
    case readMaybe (T.unpack msg) of
        Just msg -> do
            when (debug config) $
                putStrLn $ "← " ++ show msg
            return msg
        Nothing -> fail "Invalid server message"
getServerMessage config conn = do
    msg <- WS.receiveData conn
    case readMaybe (T.unpack msg) of
        Just msg -> do
            when (debug config) $
                putStrLn $ "← " ++ show msg
            return msg
        Nothing -> fail "Invalid server message"