[plt-scheme] Linking unit

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Jun 4 16:31:32 EDT 2009

Hello,

I have the following units:

binary-cluster:

#lang scheme/unit
...
(import (tag a [prefix a: cluster^])
        (tag b [prefix b: cluster^]))
(export cluster^)
...

cluster:

#lang scheme/unit
...
(import cluster-config^)
(export cluster^)
...

I want to link two instances of cluster to one binary cluster to
create a new compound unit. I've read the docs (ref and guide), I've
grepped through the PLT collects, and I can't for the life of me get
this to work.

One bogus attempt is this:

(define-compound-unit/infer c@
  (import cluster-config^)
  (export cluster^)
  (link (((BC : cluster^)) binary-cluster@ A B)
        (((A  : (tag a cluster^))) cluster@)
        (((B  : (tag b cluster^))) cluster@)))

How do I do this?

Thanks,
N.


Posted on the users mailing list.