define-record-type(cell, make-cell(value), cell?, value(cell-value,set-cell-value!)) c := make-cell(20) alias := c set-cell-value!(alias,21) import(prefix((rnrs,records,syntactic),r:)) r:define-record-type(base, r:fields(r:mutable(x))) r:define-record-type(child, r:parent(base), r:fields(y), r:protocol(fn(parent){fn(x,y){parent(x+1)(y+2)}})) inherited := make-child(19,20) base-x-set!(inherited,21) define-syntax(publish, syntax-rules((), ((_,name), { define-record-type(hidden,fields(value)) name(n) := hidden-value(make-hidden(n)) }))) publish(first) publish(second) list(cell?(alias), cell-value(c), base?(inherited), child?(inherited), base-x(inherited), child-y(inherited), record-type-name(record-type-parent(record-type-descriptor(child))), let((make-hidden(#f),hidden-value(#f)),list(first(20),second(22))))