tcStmt ret (WhileStatement l condE ann bodyS) = tcStmtBlock l "while statement" $ do
    ((ann',condE',bodyS',t'),rs,ws) <- withDecClassVars $ do
        ann' <- mapM tcLoopAnn ann
        condE' <- tcStmtBlock l "while statement" $ tcGuard condE
        (bodyS',t') <- tcLocal l "tcStmt while body" $ tcLoopBodyStmt ret l bodyS
        return (ann',condE',bodyS',t')
    debugTc $ do
        ppl <- ppr l
        pprs <- pp rs
        ppws <- pp ws
        liftIO $ putStrLn $ "whileT " ++ ppl ++ ": " ++ show pprs ++ "  :  " ++ show ppws
    return (WhileStatement (Typed l $ WhileT rs ws) condE' ann' bodyS',t')
tcStmt ret (WhileStatement l condE ann bodyS) = tcStmtBlock l "while statement" $ do
    ((ann',condE',bodyS',t'),rs,ws) <- withDecClassVars $ do
        ann' <- mapM tcLoopAnn ann
        condE' <- tcStmtBlock l "while statement" $ tcGuard condE
        (bodyS',t') <- tcLocal l "tcStmt while body" $ tcLoopBodyStmt ret l bodyS
        return (ann',condE',bodyS',t')
    debugTc $ do
        ppl <- ppr l
        pprs <- pp rs
        ppws <- pp ws
        liftIO $ putStrLn $ "whileT " ++ ppl ++ ": " ++ show pprs ++ "  :  " ++ show ppws
    return (WhileStatement (Typed l $ WhileT rs ws) condE' ann' bodyS',t')
tcStmt ret (WhileStatement l condE ann bodyS) = tcStmtBlock l "while statement" $ do
    ((ann',condE',bodyS',t'),rs,ws) <- withDecClassVars $ do
        ann' <- mapM tcLoopAnn ann
        condE' <- tcStmtBlock l "while statement" $ tcGuard condE
        (bodyS',t') <- tcLocal l "tcStmt while body" $ tcLoopBodyStmt ret l bodyS
        return (ann',condE',bodyS',t')
    debugTc $ do
        ppl <- ppr l
        pprs <- pp rs
        ppws <- pp ws
        liftIO $ putStrLn $ "whileT " ++ ppl ++ ": " ++ show pprs ++ "  :  " ++ show ppws
    return (WhileStatement (Typed l $ WhileT rs ws) condE' ann' bodyS',t')