for (Map.Entry<String, TypeSignature> entry : castFunctions.entrySet()) {
String castFunctionName = (String)entry.getKey();
SourceModel.TypeSignature typeSignature = (TypeSignature)entry.getValue();
TypeExprDefn domain = ((TypeExprDefn.Function)typeSignature.getTypeExprDefn()).getDomain();
TypeExprDefn coDomain = ((TypeExprDefn.Function)typeSignature.getTypeExprDefn()).getCodomain();
SourceModel.CALDoc.TextSegment.Plain textSegment =
SourceModel.CALDoc.TextSegment.Plain.make(
"Cast an instance of " + domain.toString() + " to " + coDomain.toString());
SourceModel.CALDoc.TextBlock textBlock =
SourceModel.CALDoc.TextBlock.make(new SourceModel.CALDoc.TextSegment.TopLevel[]{textSegment});
SourceModel.CALDoc.Comment.Function functionComment =