<p dir="ltr">Personally, I'd generally prefer if GHC got a little more interactive about name errors: "I couldn't find heod. Did you mean head?" And if the answer is yes, it could optionally edit the file for you, as well as continuing compilation.</p>
<div class="gmail_quote">On May 28, 2015 9:22 AM, "Michal Antkiewicz" <<a href="mailto:mantkiew@gsd.uwaterloo.ca">mantkiew@gsd.uwaterloo.ca</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is a great idea. <br><br>I'd like to add that introducing a new option might not be necessary. How about automatically turning unresolved name errors into named type holes? That way, they would be deferred automatically with the existing option.<br><br>Michal<br><br>On Thursday, May 28, 2015 at 4:27:11 AM UTC-4, Tom Ellis wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Deferring type errors until runtime is a feature which probably helps a lot
<br>with the adoption of Haskell.  Newcomers can get the encouragement of a
<br>mostly-working program even if there are type errors in a few places.
<br>I can write
<br>
<br>    foo = 1 + 1
<br>    bar = head True
<br>    main = print foo
<br>
<br>and still run the program or load it in GHCi.
<br>
<br>Does anyone think it would also be beneficial to have "-fdefer-name-errors"?
<br>If I write
<br>
<br>    foo = 1 + 1
<br>    bar = baz
<br>    main = print foo
<br>
<br>but baz doesn't exist it would still be nice to let the program run or be
<br>loaded in GHCi.  This could be achieved by replacing all missing variables
<br>by "error 'baz was not defined'" or similar.
<br>
<br>If a suitable parser could be written it might even be possible to defer
<br>syntax errors!
<br>
<br>This kind of thing would make the experience with Haskell gentler for
<br>newcomers, but also more pleasant for veterans!
<br>
<br>Tom
<br>
<br>_______________________________________________
<br>Haskell-Cafe mailing list
<br><a rel="nofollow">Haskel...@haskell.org</a>
<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="nofollow" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
<br></blockquote></div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>