GitHub link: License: MIT

An experiment attempting to implement type holes and type-directed search/valid hole fits using F# analyzers. Long story short, it's an attempt at suggesting replacements for unknown functions using type inference, as well as finding other entities that have matching type signatures.

Unlike some of the solutions for other FP languages, this is not a feature implemented directly in compiler, nor is it a feature of any particular IDE; rather it's using F# Analyzers.

Read more about F# Analyzers:


F# Compiler Service does not expose any API for subsumption of types. I've implemented a really naive algorithm to check if an entity can fit a given type hole... but well, it's definitely not following the rules of the F# compiler 100%, so not every suggestion is found.

I think that this limitation is acceptable given that the project is in an experimental phase - if it were productized, we would need to expose those missing APIs from F# Compiler Services, so investing more into a custom algorithm here would be a waste of time.