You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The method of article 1 was implemented with care not to change it as much as possible.
Example
// NuGet package is available.#r"nuget: TypeInferencer"openTypeInferencer// `let id = fun x -> x in id id`letexpr= ELet("id", EAbs("x", EVar"x"), EApp(EVar"id", EVar"id"))// Type environment (is empty)letenv= TypeEnv[]// Do inferring with `Algorithm W` (top-down)letactual= infer TopDown env expr// Pretty printingprintfn"Expression:%s"(show expr)printfn"Actual:%s"(show actual)
Results:
Expression: let id = fun x -> x in id idActual: a3 -> a3