[plt-scheme] Confused about requiring and prefixing SRFIs

From: Grant Rettke (grettke at acm.org)
Date: Mon Mar 24 20:32:57 EDT 2008

Hi folks,

The recommended approach to requiring SRFIs is to use the approach:

      (require (lib "NAME.ss" "srfi" "N"))

I tried that in a module where I wanted to prefix everything from SRFI
13 with 'srfi/13:' so I first tried:

     (require (lib "string.ss" "srfi" "13"))

which works and then changed it to

     (require (prefix srfi/13: (lib "string.ss" "srfi" "13")))

resulting in the error

     expand: unbound variable in module in: srfi/13:string-upcase

So I changed it back to the form of:

     (require (prefix srfi/13: (lib "13.ss" "srfi")))

At which point the prefix works correctly.

Why does one form work but not the other? (What am I doing wrong?)

Best wishes,

Grant Rettke

Posted on the users mailing list.