[racket] Help understanding error: compile: access from an uncertified context to unexported variable from module

From: Marijn (hkBst at gentoo.org)
Date: Fri Jun 17 07:36:22 EDT 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

I've reduced the test-case for this error as far as I could. File
macro.rkt contains:


(module macro racket
  (provide dlist)
  (require (for-syntax racket))

  (define-syntax (dlist stx)
    (syntax-case stx ()
      ((_ a b ...)
       (let* ((temps (generate-temporaries #'(a b ...)))
              (links `(,(last temps) , at temps ,(first temps))))
         #`(shared
               #,(let loop ((ret '())
                            (links links)
                            (vals (syntax->list #'(a b ...))))
                   (if (empty? vals) (reverse ret)
                       (loop (cons
                              #`(#,(cadr links)
                                 (link #,(car links)
                                       #,(car vals)
                                       #,(caddr links)))
                              ret)
                             (cdr links) (cdr vals) )))
             #,(cadr links))))))

  (struct link (l v r))

  ) ; end module


and another file test.rkt contains:


#lang racket

(require "./macro.rkt")

(dlist 3)


Running test.rkt produces the error:
X macro.rkt:17:34: compile: access from an uncertified context to
unexported variable from module: "/home/marijn/racketzooi/macro.rkt"

To get any indication as to the location of the error I had to do
Language -> Choose Language and deselect Populate "compiled"
directories. If you don't do this then the error is instead the even
less helpful:
compile: access from an uncertified context to unexported variable from
module: "/home/marijn/racketzooi/macro.rkt" in: link1

My understanding so far is that `macro' expands to a use of the `link'
constructor which is somehow not allowed. All my attempts to duplicate
with simpler code failed to reproduce this error.

Any help greatly appreciated,

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk37PDYACgkQp/VmCx0OL2zBVQCfXvxkE1WF6/kXfKRuRaCARjAM
Lq4AoIUWgZMu2NkRg/4d3xP7Et9mkKKU
=19i0
-----END PGP SIGNATURE-----


Posted on the users mailing list.