# Copyright 2005-2007 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.syntax("0.9") def simplifyFQName :DeepFrozen := def EventuallyDeepFrozen :()[DeepFrozen."eventually"()] := DeepFrozen."eventually"() def makeAdvisoryInterface implements DeepFrozen, ExitViaHere { to run(typeDesc) { # XXX typeDesc :Data def advisoryInterface implements EventuallyDeepFrozen { # XXX implements Data method __optSealedDispatch(brand) :any { if (brand == EventuallyDeepFrozen.getPeekBrand()) { EventuallyDeepFrozen.getPeekSealer().seal(meta.getState()) } } to audit(_) :any { # XXX allow stamping? return false } to coerce(specimen, _) { return specimen } to __printOn(out :TextWriter) :void { out.print(simplifyFQName(typeDesc.getFQName())) } # XXX should extend the TypeDesc } return advisoryInterface } }