diff --git a/src/models/rules.cc b/src/models/rules.cc index 9d236dd8d..7ddfd629e 100644 --- a/src/models/rules.cc +++ b/src/models/rules.cc @@ -216,13 +216,19 @@ ptree convert_rule(const Rules& R, const string& name, Rule rule) tc->mono_local_env() = tc->mono_local_env().insert({arg_name,{arg_name,type}}); } + // OK, now we need to typecheck the call expression. - // I guess this is a declaration? So it makes sense to run the solver. + // Do we want to import all the referenced modules and fill the poly_env before we start type checking? + + // I guess this rule is a declaration? So it makes sense to run the solver. + // And then we decide which unsolved wanteds to quantify. + // Any remaining wanteds are errors. - // Question: how/when would we ensure that things like Num [String] cause an error? + // How do we efficiently look up the types of the haskell functions? + // We contain maintain a Program and add any modules that are referenced... but that would require changing the interface. - // Do we want to import all the referenced modules and fill the poly_env before we start type checking? + // How do we ensure that instances are in scope? return rule; }