{"size": 1153, "ext": "scrbl", "max_stars_repo_path": "conditional-require/conditional-require.scrbl", "max_stars_repo_name": "maueroats/syntax-parse-example", "max_stars_repo_stars_event_min_datetime": "2017-05-18T22:15:56.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-17T13:13:05.000Z", "max_issues_repo_path": "conditional-require/conditional-require.scrbl", "max_issues_repo_name": "maueroats/syntax-parse-example", "max_issues_repo_issues_event_min_datetime": "2017-05-18T22:54:53.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-19T02:58:50.000Z", "max_forks_repo_path": "conditional-require/conditional-require.scrbl", "max_forks_repo_name": "maueroats/syntax-parse-example", "max_forks_repo_forks_event_min_datetime": "2017-05-19T14:27:57.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T09:36:54.000Z"}
{"max_stars_count": 22, "max_issues_count": 20, "max_forks_count": 6, "avg_line_length": 33.9117647059, "max_line_length": 108, "alphanum_fraction": 0.6947094536}
#lang syntax-parse-example
@require[
  (for-label racket/base syntax/parse syntax-parse-example/conditional-require/conditional-require)]

@(define conditional-require-eval
   (make-base-eval '(require syntax-parse-example/conditional-require/conditional-require)))

@title{@tt{conditional-require}}

@; =============================================================================

@defmodule[syntax-parse-example/conditional-require/conditional-require]{}

@defform[(conditional-require expr id id)]{

  This macro conditionally requires one of two module paths based on a compile-time condition.

  @racketfile{conditional-require.rkt}

  Notes:
  @itemlist[
  @item{
    The syntax class @racket[mod-name] matches syntactic strings or identifiers.
    This doesn't guarantee that the second and third argument to @racket[conditional-require]
     are valid module paths, but it rules out nonsense like @racket[(conditional-require #true (+ 2 2) 91)].
  }
  @item{
    The test could be more interesting.
    It could branch on the value of @racket[current-command-line-arguments],
     or do a @racket[case] based on @racket[system-type].
  }
  ]
}
