1 package org.simantics.scl.compiler.elaboration.chr.relations;
3 import org.simantics.scl.compiler.elaboration.chr.CHRRelation;
4 import org.simantics.scl.compiler.types.TPred;
5 import org.simantics.scl.compiler.types.TVar;
6 import org.simantics.scl.compiler.types.Type;
7 import org.simantics.scl.compiler.types.Types;
9 public enum SpecialCHRRelation implements CHRRelation {
11 MEMBER(A, Types.list(A)),
15 private final TVar[] typeVariables;
16 private final Type[] parameterTypes;
18 private SpecialCHRRelation(Type ... parameterTypes) {
19 this.typeVariables = Types.freeVarsArray(parameterTypes);
20 this.parameterTypes = parameterTypes;
24 public TVar[] getTypeVariables() {
29 public Type[] getParameterTypes() {
30 return parameterTypes;
33 public TPred[] getTypeConstraints() {
34 return TPred.EMPTY_ARRAY;