www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

tmpl-multiassoc-syntax.scrbl (1199B)


      1 #lang scribble/manual
      2 @require[racket/require
      3          "utils.rkt"
      4          @for-label[phc-toolkit/tmpl-multiassoc-syntax]]
      5 @title{Template metafunction for @racket[multiassoc-syntax]}
      6 @defmodule[phc-toolkit/tmpl-multiassoc-syntax
      7            #:use-sources
      8            [(submod (lib "phc-toolkit/tmpl-multiassoc-syntax.rkt")
      9                     typed
     10                     m-tmpl-cdr-assoc-syntax)]]
     11 
     12 @deftogether[
     13  [@defform[#:kind "template metafunction"
     14            (tmpl-cdr-assoc-syntax maybe-default query [k . v] …)
     15            #:grammar
     16            [(maybe-default (code:line)
     17                            (code:line #:default default))]]
     18   @defform[#:kind "template metafunction"
     19            (!cdr-assoc maybe-default query [k . v] …)
     20            #:grammar
     21            [(maybe-default (code:line)
     22                            (code:line #:default default))]]]]{
     23                                                           
     24  This template metafunction returns the first @racket[v] whose @racket[k] is
     25  @racket[free-identifier=?] to the given @racket[query]. If no such @racket[k]
     26  exists, then @racket[default] is returned if specified, and otherwise an error
     27  is raised while expanding the template.}
     28