import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
import org.simantics.scl.compiler.internal.interpreted.IExpression;
import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
+import org.simantics.scl.compiler.types.Type;
import org.simantics.scl.compiler.types.exceptions.MatchException;
public class ECHRRuleset extends Expression {
context.pushCHRConstraintFrame();
ruleset.resolve(context);
in = in.resolve(context);
- context.popCHRConstraintFrame(ruleset.constraints);
+ context.popCHRConstraintFrame(ruleset);
context.popFrame();
context.currentRuleset = null;
return this;
}
+ @Override
+ public Expression checkBasicType(TypingContext context, Type requiredType) {
+ ruleset.checkType(context);
+ in = in.checkType(context, requiredType);
+ return this;
+ }
+
@Override
public Expression simplify(SimplificationContext context) {
- ruleset.simplify(context);
- ruleset.compile(context);
+ ruleset.simplifyAndCompileIfNeeded(context);
in = in.simplify(context);
return this;
}