An experiment attempting to implement
type holes and
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.
type holes: https://downloads.haskell.org/~ghc/7.10.1/docs/html/users_guide/typed-holes.html
type-directed searchin PureScript: https://github.com/paf31/24-days-of-purescript-2016/blob/master/23.markdown
valid hole fitsin GHC: https://mpg.is/papers/gissurarson2018suggesting.pdf
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.