Idea that came up over dinner with Parallel Haskellers on Monday: as a dual to the -Werror flag that turns warnings into errors, we should have a -Ewarn flag that turns errors into warnings. The basic idea is that erroneous parts of the program would be replaced by calls to error. Doing this for type errors turns out to be almost trivial, but e.g. parse errors will be somewhat harder. Still, a fun thing to do sometime.
26 plus ones
Shared publicly•View activity
View 4 previous comments
- I love it. I can run a test even while another does not compile yet.Sep 21, 2011
- Having to have all your code compile just to test out one small function can be such a pain, so this sounds like a great idea.Sep 21, 2011
- Yes, I have thought such a feature would be useful. It would only work in certain contexts though, in particular, replacing something with |:forall a . a may not type check and lead to other, less obvious errors. perhaps only non-type errors?Sep 21, 2011
- I would love to turn the "The type signature for `foo' lacks an accompanying binding"-error into a warning. Just to type-check your program before filling in every implementation.Sep 21, 2011
- Yes please! I have frequently wanted to load my program in ghci and test a small part of it, even though the rest is incomplete. it would be fun if that worked even for parse errors, but just type errors would be plenty.Sep 7, 2012
- deferred type errors is in the just-released GHC 7.6.1Sep 7, 2012
Add a comment...