{"size": 2796, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/syntax/scribblings/kerncase.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "pkgs/racket-doc/syntax/scribblings/kerncase.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "pkgs/racket-doc/syntax/scribblings/kerncase.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 3, "avg_line_length": 38.301369863, "max_line_length": 101, "alphanum_fraction": 0.7303290415}
#lang scribble/doc
@(require "common.rkt" (for-label syntax/kerncase))

@(define-syntax-rule (intro id)
   (begin
     (require (for-label mzscheme))
     (define id (racket if))))
@(intro mzscheme-if)

@; ----------------------------------------------------------------------

@title[#:tag "kerncase"]{Matching Fully-Expanded Expressions}

@defmodule[syntax/kerncase]

@defform[(kernel-syntax-case stx-expr trans?-expr clause ...)]{

A syntactic form like @racket[syntax-case*], except that the literals
are built-in as the names of the primitive Racket forms as
exported by @racketmodname[racket/base], including
@racket[letrec-syntaxes+values]; see @secref[#:doc refman
"fully-expanded"].

The @racket[trans?-expr] boolean expression replaces the comparison
procedure, and instead selects simply between normal-phase comparisons
or transformer-phase comparisons. The @racket[clause]s are the same as in
@racket[syntax-case*].

The primitive syntactic forms must have their normal bindings in the
context of the @racket[kernel-syntax-case] expression. Beware that
@racket[kernel-syntax-case] does not work in a module whose language
is @racketmodname[mzscheme], since the binding of @mzscheme-if from
@racketmodname[mzscheme] is different than the primitive @racket[if].}


@defform[(kernel-syntax-case* stx-expr trans?-expr (extra-id ...) clause ...)]{

A syntactic form like @racket[kernel-syntax-case], except that it
takes an additional list of extra literals that are in addition to the
primitive Racket forms.}


@defform[(kernel-syntax-case/phase stx-expr phase-expr clause ...)]{

Generalizes @racket[kernel-syntax-case] to work at an arbitrary phase
level, as indicated by @racket[phase-expr].}


@defform[(kernel-syntax-case*/phase stx-expr phase-expr (extra-id ..) 
           clause ...)]{

Generalizes @racket[kernel-syntax-case*] to work at an arbitrary phase
level, as indicated by @racket[phase-expr].}


@defproc[(kernel-form-identifier-list) (listof identifier?)]{

Returns a list of identifiers that are bound normally,
@racket[for-syntax], and @racket[for-template] to the primitive 
Racket forms for expressions, internal-definition positions, and
module-level and top-level positions. This function is useful for
generating a list of stopping points to provide to
@racket[local-expand].

In addition to the identifiers listed in @secref[#:doc '(lib
"scribblings/reference/reference.scrbl") "fully-expanded"], the list
includes @racket[letrec-syntaxes+values], which is the core form for
local expand-time binding and can appear in the result of
@racket[local-expand].

@history[#:changed "6.90.0.27" @elem{Added @racket[quote-syntax] and @racket[#%plain-module-begin] to
                                     the list, which had previously been unintentionally missing.}]}
