final ModuleTypeInfo moduleTypeInfo = perspective.getWorkingModuleTypeInfo();
// Create a filter which will find all gems which return the specified type
// and take no inputs.
// TODO: add support for gems which do take inputs...
GemFilter filter = new GemFilter() {
@Override
public boolean select(GemEntity gemEntity) {
TypeExpr gemType = gemEntity.getTypeExpr();
return TypeExpr.canPatternMatch(gemType, returnTypeExpr, moduleTypeInfo);
}