Get proc-doc/names: unsupported procedure contract form

The following code is a minimal reproducible code

#lang at-exp racket/base
(require scribble/srcdoc
         (for-doc scribble/manual ffi/unsafe racket/base))

(provide
 (proc-doc/names
  foo
  (-> string? string?)
  (x)
  @{hi}))
(define (foo x) x)

get

main.rkt:8:2: proc-doc/names: unsupported procedure contract form (no argument names)
  at: (-> string? string?)
  in: (proc-doc/names foo (-> string? string?) (x) ("hi"))
  location...:
   main.rkt:8:2
  context...:
   /Applications/Racket v8.3/share/pkgs/scribble-lib/scribble/srcdoc.rkt:342:2: proc-doc/names-transformer
   /Applications/Racket v8.3/share/pkgs/scribble-lib/scribble/srcdoc.rkt:127:24
   .../private/map.rkt:40:19: loop
   /Applications/Racket v8.3/share/pkgs/scribble-lib/scribble/srcdoc.rkt:124:0: do-provide/doc
   /Applications/Racket v8.3/collects/racket/provide-transform.rkt:65:2: pre-expand-export
   /Applications/Racket v8.3/collects/racket/private/reqprov.rkt:783:2
   /Applications/Racket v8.3/collects/syntax/wrap-modbeg.rkt:46:4

But I search usage of proc-doc/names, for example gui/main.rkt at c2c1f0f1503c010bfc36b96541989803b1f56817 · racket/gui · GitHub, I can't get what's difference

(proc-doc/names
  text:range? (-> any/c boolean?) (arg)
  @{Determines if @racket[arg] is an instance of the @tt{range} struct.})
1 Like

You need to require racket/contract/base to get the binding for ->. (There error message here definitely needs work!)

2 Likes