Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions srfi-doc-nonfree/info.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#lang info

(define collection 'multi)

(define build-deps '("mzscheme-doc"
"scheme-lib"
"base"
"scribble-lib"
"srfi-doc"
"srfi-lib-nonfree"
"racket-doc"
"r5rs-doc"
"r6rs-doc"
"compatibility-lib"))
(define update-implies '("srfi-lib-nonfree"))

(define pkg-desc "documentation part of \"srfi nonfree\"")

(define pkg-authors '(mflatt noel chongkai jay))
3 changes: 3 additions & 0 deletions srfi-doc-nonfree/srfi/scribblings/info.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#lang info

(define scribblings '(("srfi-nf.scrbl" (multi-page) (library 100))))
66 changes: 66 additions & 0 deletions srfi-doc-nonfree/srfi/scribblings/srfi-nf.scrbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#lang scribble/doc
@(require srfi/scribblings/util
scribble/manual
scribble/eval
scriblib/render-cond
scribble/core
scribble/html-properties
(for-syntax scheme/base)
(for-label scheme/base
racket/stream))

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

@title{SRFI Nonfree Libraries and Documentation}

The @link[#:style srfi-std "http://srfi.schemers.org/"]{Scheme Requests for
Implementation} (a.k.a. @deftech{SRFI}) process allows individual
members of the Scheme community to propose libraries and extensions to
be supported by multiple Scheme implementations.

Racket is distributed with implementations of many SRFIs, most of
which can be implemented as libraries. To import the bindings of SRFI
@math{n}, use

@racketblock[
(require @#,elem{@racketidfont{srfi/}@math{n}})
]

This document lists the SRFIs that are supported by Racket and
provides a link to the original SRFI specification (which is also
distributed as part of Racket's documentation).

The following SRFI specification documents are licensed restrictively.

@table-of-contents[]


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

@srfi[5]{A compatible let form with signatures and rest arguments}

@redirect[5 '(
(let #t "unnamed")
)]

Racket provides this SRFI in the @racket[srfi-lib-nonfree] package.

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

@srfi[29]{Localization}

@redirect[29 '(
(current-language #f "current-language")
(current-country #f "current-country")
(current-locale-details #f "current-locale-details")
(declare-bundle! #f "declare-bundle!")
(store-bundle #f "store-bundle")
(load-bundle! #f "load-bundle!")
(localized-template #f "localized-template")
)]

Racket provides a free implementation of this SRFI in the @racket[srfi-lib] package. Only the SRFI specification document is nonfree.

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

@index-section[]
6 changes: 6 additions & 0 deletions srfi-doc/info.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"r5rs-doc"
"r6rs-doc"
"compatibility-lib"))

(define deps '("scheme-lib"
"base"
"scribble-lib"
"compatibility-lib"))

(define update-implies '("srfi-lib"))

(define pkg-desc "documentation part of \"srfi\"")
Expand Down
73 changes: 2 additions & 71 deletions srfi-doc/srfi/scribblings/srfi.scrbl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#lang scribble/doc
@(require scribble/manual
@(require srfi/scribblings/util
scribble/manual
scribble/eval
scriblib/render-cond
scribble/core
Expand All @@ -8,54 +9,6 @@
(for-label scheme/base
racket/stream))

@(define-syntax (srfi stx)
(syntax-case stx ()
[(_ num #:subdir subdir? . title)
(with-syntax ([srfi/n (string->symbol (format "srfi/~a" (syntax-e #'num)))])
#'(begin
(section #:tag (format "srfi-~a" num)
#:style 'unnumbered
(format "SRFI ~a: " num)
. title)
(defmodule srfi/n)
"Original specification: "
(let* ([label (format "SRFI ~a" num)]
[sub (if subdir? (format "srfi-~a/" num) "")]
[url (λ (b) (format "~a/srfi-std/~asrfi-~a.html" b sub num))])
(cond-element
[(or latex text) @link[(url "http://docs.racket-lang.org") label]]
[else @link[(url ".") label]]))))]
[(_ num . title) #'(srfi num #:subdir #f . title)]))

@;{ The `lst' argument is a list of
(list sym syntactic-form? html-anchor) }
@(define (redirect n lst #:subdir [subdir? #f])
(let ([file (if subdir?
(format "srfi-~a/srfi-~a.html" n n)
(format "srfi-~a.html" n))]
[mod-path (string->symbol (format "srfi/~a" n))])
(make-binding-redirect-elements mod-path
(map (lambda (b)
(list (car b) (cadr b)
(build-path "srfi-std" file)
(caddr b)))
lst))))

@(define in-core
(case-lambda
[() (in-core ".")]
[(k) @elem{This SRFI's bindings are also available in
@racketmodname[racket/base]@|k|}]))

@(begin
(define-syntax-rule (def-mz mz-if)
(begin
(require (for-label mzscheme))
(define mz-if (racket if))))
(def-mz mz-if))

@(define srfi-std (style #f (list (install-resource "srfi-std"))))

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

@title{SRFIs: Libraries}
Expand Down Expand Up @@ -245,14 +198,6 @@ are also available from @racketmodname[scheme/foreign].

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

@srfi[5]{A compatible let form with signatures and rest arguments}

@redirect[5 '(
(let #t "unnamed")
)]

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

@srfi[6]{Basic String Ports}

@redirect[6 '(
Expand Down Expand Up @@ -671,20 +616,6 @@ returns @racket[#f].

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

@srfi[29]{Localization}

@redirect[29 '(
(current-language #f "current-language")
(current-country #f "current-country")
(current-locale-details #f "current-locale-details")
(declare-bundle! #f "declare-bundle!")
(store-bundle #f "store-bundle")
(load-bundle! #f "load-bundle!")
(localized-template #f "localized-template")
)]

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

@srfi[30]{Nested Multi-line Comments}

This SRFI's syntax is part of Racket's default reader.
Expand Down
61 changes: 61 additions & 0 deletions srfi-doc/srfi/scribblings/util.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#lang scribble/doc

@(require scribble/manual
scribble/eval
scriblib/render-cond
scribble/core
scribble/html-properties
(for-syntax scheme/base)
(for-label scheme/base
racket/stream))

@(provide (all-defined-out))

@(define-syntax (srfi stx)
(syntax-case stx ()
[(_ num #:subdir subdir? . title)
(with-syntax ([srfi/n (string->symbol (format "srfi/~a" (syntax-e #'num)))])
#'(begin
(section #:tag (format "srfi-~a" num)
#:style 'unnumbered
(format "SRFI ~a: " num)
. title)
(defmodule srfi/n)
"Original specification: "
(let* ([label (format "SRFI ~a" num)]
[sub (if subdir? (format "srfi-~a/" num) "")]
[url (λ (b) (format "~a/srfi-std/~asrfi-~a.html" b sub num))])
(cond-element
[(or latex text) @link[(url "http://docs.racket-lang.org") label]]
[else @link[(url ".") label]]))))]
[(_ num . title) #'(srfi num #:subdir #f . title)]))

@;{ The `lst' argument is a list of
(list sym syntactic-form? html-anchor) }
@(define (redirect n lst #:subdir [subdir? #f])
(let ([file (if subdir?
(format "srfi-~a/srfi-~a.html" n n)
(format "srfi-~a.html" n))]
[mod-path (string->symbol (format "srfi/~a" n))])
(make-binding-redirect-elements mod-path
(map (lambda (b)
(list (car b) (cadr b)
(build-path "srfi-std" file)
(caddr b)))
lst))))

@(define in-core
(case-lambda
[() (in-core ".")]
[(k) @elem{This SRFI's bindings are also available in
@racketmodname[racket/base]@|k|}]))

@(begin
(define-syntax-rule (def-mz mz-if)
(begin
(require (for-label mzscheme))
(define mz-if (racket if))))
(def-mz mz-if))

@(define srfi-std (style #f (list (install-resource "srfi-std"))))

14 changes: 14 additions & 0 deletions srfi-lib-nonfree/info.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#lang info

(define collection 'multi)

(define deps '("scheme-lib"
"base"
"r6rs-lib"
"srfi-lib"
"compatibility-lib"))


(define pkg-desc "implementation (no documentation) part of \"srfi nonfree\"")

(define pkg-authors '(mflatt noel chongkai jay))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading