if(compilationContext.errorLog.getErrorCount() != errorCountBeforeTypeChecking) {
int typeArity = Types.getArity(type);
if(typeArity != functionArity)
- compilationContext.errorLog.log(value.definitionLocation, "Possible problem: type declaration has " + typeArity + " parameter types, but function definition has " + functionArity + " parameters.");
+ compilationContext.errorLog.logWarning(value.definitionLocation, "Possible problem: type declaration has " + typeArity + " parameter types, but function definition has " + functionArity + " parameters.");
}
ArrayList<EVariable> demands = context.getConstraintDemand();
compilationContext.errorLog.log(c.getDemandLocation(),
"Constraint <"+c.constraint+"> is not given and cannot be derived.");
}
- if(compilationContext.errorLog.isEmpty()) { // To prevent exceptions
+ if(compilationContext.errorLog.hasNoErrors()) { // To prevent exceptions
expression = ExpressionAugmentation.augmentSolved(
red.solvedConstraints,
expression);
}
}
else {
- if(compilationContext.errorLog.isEmpty()) // To prevent exceptions
+ if(compilationContext.errorLog.hasNoErrors()) // To prevent exceptions
expression = expression.decomposeMatching();
}
expression = expression.closure(vars.toArray(new TVar[vars.size()]));
}
public void typeCheck() {
- ce = new ConstraintEnvironment(environment);
+ ce = new ConstraintEnvironment(compilationContext);
scheduler = new TypeCheckingScheduler(compilationContext);
typeCheckValues();
for(TransformationRule rule : module.getRules())
for(Query[] queries : rule.sections.values())
for(Query query : queries)
- query.collectRefs(allRefs, refs);
+ query.collectRefs(allRefs, refs);
}
@Override