[racket] Error in _bitmask

From: Клочков Роман (kalimehtar at mail.ru)
Date: Sat Jun 8 04:45:08 EDT 2013

 At file:///usr/share/doc/racket/foreign/Enumerations_and_Masks.html?q=_enum#%28def._%28%28lib._ffi%2Funsafe..rkt%29.__enum%29%29

>procedure
>( _bitmask   symbols   [ basetype ] )   →   ctype?
   symbols   :   ( or   symbol?   list? )  
Trying:

> (_bitmask '(a b))
_bitmask: bad spec in '(a b)
> (_bitmask 'a)
cdr: contract violation
  expected: pair?
  given: 'a
Works just fine:

 > (cast 5 _int (_bitmask '((a 1) (b 2))))
'(a)
 
> (cast 5 _int (_bitmask '(a = 1 b = 2)))
'(a)

So there is an error either in documentation or in ffi/unsafe. I expected (_bitmask '(a b c)) to be treated as (_bitmask '(a = 1 b = 2 c = 4)) and so on.

Plese, fix either docs, or module. 

I have Racket 5.3.4 @ Debian testing.

monk at veles:~$ dpkg -s racket
Package: racket
Status: install ok installed
Priority: optional
Section: lisp
Installed-Size: 9913
Maintainer: David Bremner <bremner at debian.org>
Architecture: i386
Version: 5.3.4+r2+dfsg1-2

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130608/91bec0bd/attachment.html>

Posted on the users mailing list.