public TypeCheckingResult(IConstrainedData data, IPartialType type, IEnumerable<Constraint> constraints, int maximalIndex) { Type = type; Data = data; Constraints = constraints; MaximalIndex = maximalIndex; }
public Constraint(int index, IPartialType type) { Index = index; Type = type; }
public static TypeCheckingEnvironment Replace(this TypeCheckingEnvironment e, string ident, IPartialType type) { return ident1 => ident.Equals(ident1) ? type : e(ident1); }
public static IEnumerable<int> Collect(IPartialType type) { var collector = new UnknownTypeCollector(); type.AcceptVisitor(collector); return collector.Unknowns; }
public static IEnumerable<Constraint> Single(int index, IPartialType type) { yield return new Constraint(index, type); }