tcLoopBodyStmt :: (ProverK loc m) => Type -> loc -> Statement Identifier loc -> TcM m (Statement GIdentifier (Typed loc),Type)
tcLoopBodyStmt ret l s = do
    (s',StmtType cs) <- tcStmtBlock l "loop body statement" $ tcStmt ret s
    -- check that the body can perform more than iteration
    when (Set.null $ Set.filter isIterationStmtClass cs) $ do
        pps <- pp s
        tcWarn (locpos l) $ SingleIterationLoop (pps)
    -- return the @StmtClass@ for the whole loop
    let t' = StmtType $ Set.insert (StmtFallthru $ ComplexT Void) (Set.filter (\c -> not (isLoopStmtClass c) && not (isStmtFallthru c)) cs)
    return (s',t')
    
-- | Typechecks a @Statement@
tcLoopBodyStmt :: (ProverK loc m) => Type -> loc -> Statement Identifier loc -> TcM m (Statement GIdentifier (Typed loc),Type)
tcLoopBodyStmt ret l s = do
    (s',StmtType cs) <- tcStmtBlock l "loop body statement" $ tcStmt ret s
    -- check that the body can perform more than iteration
    when (Set.null $ Set.filter isIterationStmtClass cs) $ do
        pps <- pp s
        tcWarn (locpos l) $ SingleIterationLoop (pps)
    -- return the @StmtClass@ for the whole loop
    let t' = StmtType $ Set.insert (StmtFallthru $ ComplexT Void) (Set.filter (\c -> not (isLoopStmtClass c) && not (isStmtFallthru c)) cs)
    return (s',t')
    
-- | Typechecks a @Statement@
tcLoopBodyStmt ret l s = do
    (s',StmtType cs) <- tcStmtBlock l "loop body statement" $ tcStmt ret s
    -- check that the body can perform more than iteration
    when (Set.null $ Set.filter isIterationStmtClass cs) $ do
        pps <- pp s
        tcWarn (locpos l) $ SingleIterationLoop (pps)
    -- return the @StmtClass@ for the whole loop
    let t' = StmtType $ Set.insert (StmtFallthru $ ComplexT Void) (Set.filter (\c -> not (isLoopStmtClass c) && not (isStmtFallthru c)) cs)
    return (s',t')
    
-- | Typechecks a @Statement@