[Haskell-cafe] -fdefer-more-errors
Michal Antkiewicz
mantkiew at gsd.uwaterloo.ca
Thu May 28 13:21:57 UTC 2015
That is a great idea.
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.
Michal
On Thursday, May 28, 2015 at 4:27:11 AM UTC-4, Tom Ellis wrote:
>
> Deferring type errors until runtime is a feature which probably helps a
> lot
> with the adoption of Haskell. Newcomers can get the encouragement of a
> mostly-working program even if there are type errors in a few places.
> I can write
>
> foo = 1 + 1
> bar = head True
> main = print foo
>
> and still run the program or load it in GHCi.
>
> Does anyone think it would also be beneficial to have
> "-fdefer-name-errors"?
> If I write
>
> foo = 1 + 1
> bar = baz
> main = print foo
>
> but baz doesn't exist it would still be nice to let the program run or be
> loaded in GHCi. This could be achieved by replacing all missing variables
> by "error 'baz was not defined'" or similar.
>
> If a suitable parser could be written it might even be possible to defer
> syntax errors!
>
> This kind of thing would make the experience with Haskell gentler for
> newcomers, but also more pleasant for veterans!
>
> Tom
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskel... at haskell.org <javascript:>
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150528/4be27651/attachment-0001.html>
More information about the Haskell-Cafe
mailing list