import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.simantics.scl.compiler.common.names.Name;
+import org.simantics.scl.compiler.constants.Constant;
import org.simantics.scl.compiler.elaboration.modules.SCLValue;
-import org.simantics.scl.compiler.elaboration.modules.TypeAlias;
import org.simantics.scl.compiler.elaboration.modules.TypeClass;
import org.simantics.scl.compiler.elaboration.modules.TypeClassInstance;
-import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;
+import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;
import org.simantics.scl.compiler.elaboration.relations.SCLEntityType;
import org.simantics.scl.compiler.elaboration.relations.SCLRelation;
import org.simantics.scl.compiler.elaboration.rules.TransformationRule;
else
return base.getValue(name);
}
+
+ @Override
+ public List<Constant> getFieldAccessors(String name) {
+ List<Constant> r1 = base.getFieldAccessors(name);
+ List<Constant> r2 = module.getFieldAccessors(name);
+ if(r1 == null)
+ return r2;
+ if(r2 == null)
+ return r1;
+ ArrayList<Constant> result = new ArrayList<Constant>(r1.size() + r2.size());
+ result.addAll(r1);
+ result.addAll(r2);
+ return result;
+ }
+
@Override
public SCLRelation getRelation(Name name) {
if(name.module.equals(module.getName()))
return base.getEntityType(name);
}
@Override
- public TypeConstructor getTypeConstructor(TCon type) {
+ public TypeDescriptor getTypeDescriptor(TCon type) {
if(type.module.equals(module.getName()))
- return module.getTypeConstructor(type.name);
+ return module.getTypeDescriptor(type.name);
else
- return base.getTypeConstructor(type);
+ return base.getTypeDescriptor(type);
}
@Override
public EffectConstructor getEffectConstructor(TCon type) {
return base.getEffectConstructor(type);
}
@Override
- public TypeAlias getTypeAlias(TCon type) {
- if(type.module.equals(module.getName()))
- return module.getTypeAlias(type.name);
- else
- return base.getTypeAlias(type);
- }
- @Override
public TypeClass getTypeClass(TCon type) {
if(type.module.equals(module.getName()))
return module.getTypeClass(type.name);