This file is indexed.

/usr/share/racket/collects/unstable/markparam.rkt is in racket-common 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#lang racket/base
(require racket/serialize
         racket/function
         racket/contract/base
         (for-syntax racket/base))

(define mark-parameter-first
  (curry continuation-mark-set-first #f))
(define (mark-parameter-all mp [prompt-tag (default-continuation-prompt-tag)])
  (continuation-mark-set->list (current-continuation-marks) mp prompt-tag))
(define (mark-parameters-all mps [none-v #f] [prompt-tag (default-continuation-prompt-tag)])
  (continuation-mark-set->list* (current-continuation-marks) mps none-v prompt-tag))

(serializable-struct
 mark-parameter ()
 #:transparent
 #:property prop:procedure mark-parameter-first)

(define-syntax with-continuation-mark*
  (syntax-rules ()
    [(_ () body-expr ...)
     (begin body-expr ...)]
    [(_ ([k v]) body-expr ...)
     (with-continuation-mark k v body-expr ...)]
    [(_ ([k0 v0] [k1 v1] ...) body-expr ...)
     (with-continuation-mark k0 v0
       (with-continuation-mark* ([k1 v1] ...)
         body-expr ...))]))

(define-syntax (mark-parameterize stx)
  (syntax-case stx ()
    [(_ ([mp expr] ...) body-expr ...)
     (with-syntax ([(expr-val ...) (generate-temporaries #'(expr ...))])
       (syntax/loc stx
         (let ([expr-val expr] ...)
           (with-continuation-mark* ([mp expr-val] ...)
             body-expr ...))))]))

(provide mark-parameterize
         (struct-out mark-parameter))
(provide/contract
 [mark-parameter-first ((mark-parameter?) (continuation-prompt-tag?) . ->* . any/c)]
 [mark-parameter-all ((mark-parameter?) (continuation-prompt-tag?) . ->* . list?)]
 [mark-parameters-all (((listof mark-parameter?)) (any/c continuation-prompt-tag?) . ->* . (listof vector?))])