[plt-scheme] Re: scheme/signature and require

From: detmammut at googlemail.com (detmammut at googlemail.com)
Date: Tue Mar 24 05:54:48 EDT 2009


On 24 Mrz., 02:48, Chongkai Zhu <c... at cs.utah.edu> wrote:
> You don't need the (require scheme/base) line.

Hello,

Sorry for using an imcomplete example, what I really want is below. I
think the problem might be that the require from scheme/base is
different from the require in mzscheme (the latter of which is used in
the unit implementation).

--- source-lang-sig.ss

#lang scheme/signature

(require (prefix-in s: scheme/base))

marshall-rest-list

(define-syntaxes (lambda)
  (syntax-rules ()
    ((_ (?arg ...) . ?body)
     (s:lambda (?arg ...) . ?body))
    ((_ (?arg ... . ?rest) . ?body)
     (s:lambda (?arg ... . ?rest)
       (let ((?rest (marshall-rest-list ?rest)))
         . ?body)))))

---

the workarround i'm using now:

--- source-lang-sig.ss

#lang scheme

(require (prefix-in s: scheme/base))

(define-signature source-lang^
  (

   marshall-rest-list

   (define-syntaxes (lambda)
     (syntax-rules ()
       ((_ (?arg ...) . ?body)
        (s:lambda (?arg ...) . ?body))
       ((_ (?arg ... . ?rest) . ?body)
        (s:lambda (?arg ... . ?rest)
          (let ((?rest (marshall-rest-list ?rest)))
            . ?body)))))

   ))

---



Posted on the users mailing list.