[racket] help on error: module-path-index-resolve: "self" index has no resolution?

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Sat Nov 6 21:39:37 EDT 2010

I'm trying to reuse the definitions of ASL for Moby/js-vm, and ran
across a strange macro error.  I've reduced a test case to show the
bug:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; when.rkt
#lang racket
(define-syntax -when
  ((lambda (dont-care)
     (lambda (stx)
       (syntax-case stx ()
         [(_ q expr ...)
          (syntax/loc stx
            (when q expr ...))])))
   42))

(provide (rename-out [-when when]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; test-when.rkt
(when 42
  'huh)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

When I try to run test-when.rkt, I see the following error:

    module-path-index-resolve: "self" index has no resolution:
#<module-path-index>

As far as I can tell, the bug is being triggered by the use of the
function application to create when "when" value binding.  Does anyone
know what's happening here?


Posted on the users mailing list.