namespace-variable-value thinks functions are bound to syntax

Junsong Li <[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <CA+kGxtOno4+SCV1QjK9qHhEYHwb4vERosB9qKBWzvZ-4NN_D_A@mail.gmail.com>
Hello list,

In the following program, racket thinks foo2, and foo3 are bound to
syntax. Is this expected behavior?

-- File: go.rkt

#lang racket

(module p racket
  (provide (all-defined-out))

  (define (foo0 a b)
    (+ a b))
  (define (foo1 a b [c 3])
    (+ a b c))
  (define (foo2 a b [c 3] #:kw1 kw1)
    (+ a b c))
  (define (foo3 a b [c 3] #:kw1 kw1 #:kw2 [kw2 1])
    (+ a b c))
  )

(require syntax/location)

(define ns (make-base-empty-namespace))
(parameterize ([current-namespace ns])
  (namespace-require (quote-module-path p)))

(namespace-variable-value 'foo0 #t #f ns) ; OK
(namespace-variable-value 'foo1 #t #f ns) ; OK
(namespace-variable-value 'foo2 #t #f ns) ; namespace-variable-value:
bound to syntax in: foo2
(namespace-variable-value 'foo3 #t #f ns) ; namespace-variable-value:
bound to syntax in: foo3

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.