Why ffi's `_list` is bad syntax?

Code

#lang racket
(require ffi/unsafe)

(_fun (_list io _uint32) -> _uint32)

Full error message:

ffi.rkt:5:6: _list: bad syntax
  in: (_list io _uint32)
  location...:
   ffi.rkt:5:6
  context...:
   /Applications/Racket v8.6/collects/ffi/unsafe.rkt:349:6: do-expand
   /Applications/Racket v8.6/collects/ffi/unsafe.rkt:395:2: custom-type->keys
   /Applications/Racket v8.6/collects/ffi/unsafe.rkt:624:2: t-n-e
   .../private/map.rkt:54:19: loop
   [repeats 1 more time]
   /Applications/Racket v8.6/collects/ffi/unsafe.rkt:592:0
   /Applications/Racket v8.6/collects/syntax/wrap-modbeg.rkt:46:4
1 Like

The len argument of _list is needed when the mode is o or io.

The error message could be better.

1 Like