paneman/src/channel.tmpl


readonly proc _queue (nm, elt, vis) is
    local queue = nm & "Queue"
    build_generic_intf (queue, "Queue", [elt], vis)
    build_generic_impl (queue, "Queue", [elt])
  end

readonly proc _channel (nm, elt, vis) is
    local chan = nm & "Chan"
    local queue = nm & "Queue"
    _queue(nm, elt, vis)
    build_generic_intf (chan, "Channel", [elt], vis)
    build_generic_impl (chan, "Channel", [elt, queue])
  end

readonly proc Channel (nm, elt) is _channel (nm, elt, VISIBLE) end
readonly proc channel (nm, elt) is _channel (nm, elt, HIDDEN)  end