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