<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>______________________________<wbr>_________________
<br>Haskell-Cafe mailing list
<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="2HlkAW81O6YJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">Haskel...@haskell.org</a>
<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\46sa\75D\46sntz\0751\46usg\75AFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\46sa\75D\46sntz\0751\46usg\75AFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a>
<br></blockquote></div>