tcNonEmptyStmt :: (ProverK loc m) => Type -> Statement Identifier loc -> TcM m (Statement GIdentifier (Typed loc),Type)
tcNonEmptyStmt ret s = do
    r@(s',StmtType cs) <- tcStmtBlock (loc s) "non-empty statement" $ tcStmt ret s
    when (Set.null cs) $ do
        pps <- pp s
        tcWarn (locpos $ loc s) $ EmptyBranch (pps)
    return r

-- | Typecheck a statement in the body of a loop
tcNonEmptyStmt :: (ProverK loc m) => Type -> Statement Identifier loc -> TcM m (Statement GIdentifier (Typed loc),Type)
tcNonEmptyStmt ret s = do
    r@(s',StmtType cs) <- tcStmtBlock (loc s) "non-empty statement" $ tcStmt ret s
    when (Set.null cs) $ do
        pps <- pp s
        tcWarn (locpos $ loc s) $ EmptyBranch (pps)
    return r

-- | Typecheck a statement in the body of a loop
tcNonEmptyStmt ret s = do
    r@(s',StmtType cs) <- tcStmtBlock (loc s) "non-empty statement" $ tcStmt ret s
    when (Set.null cs) $ do
        pps <- pp s
        tcWarn (locpos $ loc s) $ EmptyBranch (pps)
    return r

-- | Typecheck a statement in the body of a loop