private/require-below.ss
#lang scheme/base

(require "rename-below.ss"
         (for-syntax scheme/base scheme/require-transform))

(provide require-below)

(define-syntax (require-below stx)
  (syntax-case stx ()
    [(_ spec ...)
     (let*-values ([(imports sources) (expand-import #'(combine-in spec ...))]
                   [(names) (map import-local-id imports)]
                   [(temps) (generate-temporaries names)])
       (with-syntax ([(name ...) names]
                     [(temp ...) temps])
         (syntax/loc stx
           (begin
             (require (rename-in (combine-in spec ...) [name temp] ...))
             (rename-below [temp name] ...)))))]))