.closure(vars));
value.setType(Types.forAll(vars,
Types.constrained(constraints, value.getType())));
+ //System.out.println(value.getName() + " :: " + value.getType());
// Add evidence parameters to recursive calls
for(EPlaceholder ref : recursiveReferences) {
for(EAmbiguous overloaded : context.overloadedExpressions)
overloaded.assertResolved(compilationContext.errorLog);
expression.getType().addPolarity(Polarity.POSITIVE);
+ //System.out.println("--- " + value.getName() + " -------------------------------------------------------------------------");
context.solveSubsumptions(expression.getLocation());
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();
}
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