3 ms·
> The type checker is a tool that lets you query for information about your program. It's an immense aid to reasoning and a powerful sanity check against your a
by kazagistar 13y ago
> The type checker is a tool that lets you query for information about your program. It's an immense aid to reasoning and a powerful sanity check against your assumptions.
Sure. But it is a slower feedback cycle then a good IDE (which tells you what it is expecting as you type it). Also, the same can be said about an interpreter: you can try things, and when they fail, it lets you know what it was expecting.
- joeyh 13y agoThere are several projects that make the haskell type checker run on the fly (more or less) as code is entered in an editor. ghc-mod is one; hdevtools is another; FP complete has a web based haskell editor with on the fly type checking too.
- gnuvince 13y agoI recently installed ghc-mod [1] and configured it in Emacs; red squiggly lines appear when I have an error. [1] http://www.mew.org/~kazu/proj/ghc-mod/en/ http://www.mew.org/~kazu/proj/ghc-mod/en/
- kazagistar 13y agoWell, thats a start at least. Check as you type is only the tip of the iceberg, though, in creating a tighter programmer/compiler feedback loop. Detecting and listing all the possible choices for you to type automatically is something else... a good IDE can know which functions are valid in the current location, what values are valid parameters for those functions, and can list and auto-complete them.