2 ms·
What if someone developed a language where the compiler did Hindley-Milner type inference and was implemented in the language itself? This would make the infer
by stcredzero 18y ago
What if someone developed a language where the compiler did Hindley-Milner type inference and was implemented in the language itself? This would make the inferencing available to IDEs, which could then automatically fill in type annotations for the programmer.
- silentbicycle 18y agoHaskell does this already. You can ask the Haskell runtime the type annotation for a given function. The Haskell's Emacs mode (http://www.haskell.org/haskell-mode/ http://www.haskell.org/haskell-mode/) can insert it at point. Also, PLT Scheme's "Mr. Spidey" (http://www.plt-scheme.org/software/mrspidey/ http://www.plt-scheme.org/software/mrspidey/) looks like an interesting type-inference system (non-HM), though I haven't personally used it.