private static Signature InferSignature(Func <string, Classification <dynamic> > doImport, Environment <Classification <TypedTerm> > environment, ModuleType moduleType) { var untyped = moduleType.Members; var members = new Classification <string> [untyped.Length]; foreach (var index in ArrayOperations.CountUp(untyped.Length)) { var binding = untyped[index]; var typed = InferType(doImport, environment, binding.Value).Normalized(environment); var quantifier = typed.ShiftDown(binding.Key); members[index] = quantifier; environment = environment.Push(quantifier); } return(new Signature(members)); }
public Module(ModuleType content) : base(Productions.Module) { Content = content; }