On this page:
require/ provide
quote-require
define-planet-package
define-collection
this-package-in
Version: 5.1

18 Requiring Modules

 (require unstable/require)

This module provides tools for importing from modules.

(require/provide module-path ...)
Re-exports all bindings provided by each module-path. Equivalent to:

  (require module-path ...)
  (provide (all-from-out module-path ...))

(quote-require require-spec ...)
Produces the names exported by the require-specs as a list of symbols.

Example:

  > (quote-require racket/bool racket/function)

  '(false true symbol=? false? boolean=? negate curryr curry const)

(define-planet-package name package)
Defines a shortcut name for importing modules from planet package package. Subsequently, (name module) is equivalent to (planet package/module) as a require path. For instance, to import the text and web modules from this package:

  (define-planet-package my-package cce/scheme)
  (require (my-package web) (my-package text))

The above require is equivalent to:

  (require (planet cce/scheme/web) (planet cce/scheme/text))

(define-collection name collect)
Defines a shortcut name for importing modules from collect and its subcollections. Subsequently, (name) is equivalent to collect as a require path, and (name path) is equivalent to collect/path.

  (define-collection macro syntax)
  (require (macro parse))

The above require is equivalent to the below:

  (require syntax/parse)

This require transformer imports the file at path in the current planet package. For instance, in the package (planet cce/scheme:7), writing:
  (require (this-package-in function))
... is equivalent to writing:
  (require (planet cce/scheme:7/function))