Shared publicly  - 
 
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
2
Simon Marlow's profile photoPeter Arrenbrecht's profile photoBraden Shepherdson's profile photoJean-Philippe Gariépy's profile photo
10 comments
 
By calls to the error? Could you clarify, if you have the time?
 
Under Java, the compiler of Eclipse IDE convert syntax errors into instructions that will raise an exception when executed. So the class will be partially compiled.

I seldom find it useful. Sometime I run my program without noticing that an error remains in the code, then I get the "unresolved compilation error".
 
I love it. I can run a test even while another does not compile yet.
 
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.
 
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?
 
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.
 
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.
Add a comment...