[plt-scheme] compound-unit/sig

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Sun May 18 10:07:37 EDT 2003

As an exercise, I played with using compound-unit/sig to make locale
mechanisms pluggable in an SRFI-19 implementation.

The following seems to work, but could someone who understands
modules/units/sigs better tell me if I'm doing it suboptimally?

    (module srfi19-nolocale mzscheme

      (require (lib "unitsig.ss")

      (define srfi19-nolocale@
          (link   (LOCALE : locale^ (dummy-locale@))
                  (BASE   : srfi19^ (base@ LOCALE)))
          (export (open BASE))))

      (define-values/invoke-unit/sig srfi19^ srfi19-nolocale@)

      (provide-signature-elements srfi19^))


Posted on the users mailing list.