Re: [racket-users] Higher-order units

2018-10-17 Thread Philip McGrath
The way I have found to do this is to both use the `tag` form and explicitly rename all signature elements, e.g.: (define-unit twice-collector@ (import (tag base (prefix base: collector^))) (export collector^) (define item/c base:item/c) (define (collect . xs) (apply base:collect

[racket-users] Higher-order units

2018-10-17 Thread Alexis King
Imagine I have the following signature: (define-signature collector^ [(contracted [item/c contract?] [collect (-> item/c ... item/c)])]) Writing a unit that exports this signature is easy. For example, here’s one that sums its arguments: (define-unit