reprovide-lang
1 #lang reprovide
#%module-begin
2 reprovide as a macro
reprovide
3 Extra require forms
glob-in
7.1

reprovide-lang

1 #lang reprovide

A #lang language for reproviding modules.

For example, a module that reprovided racket/match and racket/list at runtime, and provided racket/base and syntax/parse for-syntax would look like this:
#lang reprovide
racket/match
racket/list
(for-syntax racket/base
            syntax/parse)

syntax

(#%module-begin require-spec ...)

Expands to the form (reprovide require-spec ...) within racket/base’s #%module-begin form.

2 reprovide as a macro

This module provides reprovide as a macro.

syntax

(reprovide require-spec ...)

This form requires each require-spec and provides everything imported from all of them.

3 Extra require forms

 (require reprovide/require-transformer/glob-in)
  package: reprovide-lang

These forms are provided by both #lang reprovide and reprovide/require-transformer/glob-in.

syntax

(glob-in glob-str ...)

Examples:

(require (glob-in "directory/*.rkt"))
requires every file ending in .rkt in the given directory.

(require (glob-in "directory/*.{rkt,scrbl}"))
requires every file ending in .rkt or .scrbl in the given directory.

(require (glob-in "{linear,affine}/{data,transformation,decomposition}.rkt"))
requires six things, according to every combination of options:
  • linear/data.rkt

  • linear/transformation.rkt

  • linear/decomposition.rkt

  • affine/data.rkt

  • affine/transformation.rkt

  • affine/decomposition.rkt

The syntax for each glob-str is described in Globbing.