[plt-scheme] using except-out with prefix-out

From: Doug Orleans (dougorleans at gmail.com)
Date: Mon Apr 14 16:37:51 EDT 2008

Matthew Flatt writes:
 > At Mon, 14 Apr 2008 15:50:38 -0400, Doug Orleans wrote:
 > > I want to make a module that re-exports all the bindings from another
 > > module, but with some of them wrapped. 

Here's a simpler way of doing it:

  #lang scheme

  (require "foo.ss")
  (provide (except-out (all-from-out "foo.ss") foo))
  (provide (rename-out (wrapped:foo foo)))

  (define (wrapped:foo x) (cons 'wrapped (foo x)))

But I don't want to have a separate rename clause for each wrapped
binding.  I guess what I want is an `unprefix-out':

  (provide (unprefix-out wrapped: (all-defined-out)))

--dougorleans at gmail.com


Posted on the users mailing list.