fine-tune typechecking index entry

svn: r12920
This commit is contained in:
Matthew Flatt 2008-12-21 13:57:46 +00:00
parent 424ec50bfb
commit ec600c59bb
3 changed files with 12 additions and 4 deletions

View File

@ -677,9 +677,11 @@
[(_ x ...) (begin (set! xs (syntax->list #'(x ...))) (do-fun))])) [(_ x ...) (begin (set! xs (syntax->list #'(x ...))) (do-fun))]))
(define (function-ptr p fun-ctype) (define (function-ptr p fun-ctype)
(if (cpointer? p) (if (or (cpointer? p) (procedure? p))
(if (eq? (ctype->layout fun-ctype) 'fpointer) (if (eq? (ctype->layout fun-ctype) 'fpointer)
((ctype-c->scheme fun-ctype) p) (if (procedure? p)
((ctype-scheme->c fun-ctype) p)
((ctype-c->scheme fun-ctype) p))
(raise-type-error 'function-ptr "function ctype" fun-ctype)) (raise-type-error 'function-ptr "function ctype" fun-ctype))
(raise-type-error 'function-ptr "cpointer" p))) (raise-type-error 'function-ptr "cpointer" p)))

View File

@ -189,7 +189,13 @@ strings for a hierarchy, such as @scheme['("strings" "plain")] for a
the strings are ``cleaned'' using @scheme[clean-up-index-strings]. The the strings are ``cleaned'' using @scheme[clean-up-index-strings]. The
strings (without clean-up) also serve as the text to render in the strings (without clean-up) also serve as the text to render in the
index. The @tech{decode}d @scheme[pre-content] is the text to appear index. The @tech{decode}d @scheme[pre-content] is the text to appear
inline as the index target.} inline as the index target.
Use @scheme[index] when an index entry should point to a specific word
or phrase within the typeset document (i.e., the
@scheme[pre-content]). Use @scheme[section-index], instead, to create
an index entry that leads to a section, instead of a specific word or
phrase within the section.}
@defproc[(index* [words (listof string?)] @defproc[(index* [words (listof string?)]

View File

@ -14,7 +14,7 @@
@author["Sam Tobin-Hochstadt"] @author["Sam Tobin-Hochstadt"]
@index["typecheck"] @section-index["typechecking"]
Typed Scheme is a Scheme-like language, with a type system that Typed Scheme is a Scheme-like language, with a type system that
supports common Scheme programming idioms. Explicit type declarations supports common Scheme programming idioms. Explicit type declarations