public static IType Infer(InferenceState initial, ITerm term) { var inference = new TypeInference(initial).Infer(term, out var result); Console.WriteLine($"Final: {inference}"); var normalized = inference._state.Context.Normalize().Apply(result); return(normalized); }
private TypeInference(InferenceState inference) { this._state = inference; }
private TypeInference(FreshVariableStream fresh, IImmutableList <IContextEntry> context) { this._state = new InferenceState(fresh, context); }
private TypeInference() { this._state = new InferenceState(new FreshVariableStream(), ImmutableList <IContextEntry> .Empty); }