[Haskell-cafe] -fdefer-more-errors

Dan Burton danburton.email at gmail.com
Thu May 28 09:38:37 UTC 2015


Wow, I just posted to reddit asking about the same thing. Should have
checked my email first. :)

http://www.reddit.com/r/haskell/comments/37km7e/fdeferscopeerrors_anyone/

Obviously, I concur that this would make Haskell more pleasant for me. I
just used -fdefer-type-errors today, which turned out to be a huge
convenience, and I would have similarly benefited from -fdefer-name-errors.

-- Dan Burton

On Thu, May 28, 2015 at 1:26 AM, Tom Ellis <
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> 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
> Haskell-Cafe at haskell.org
> 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/835749f7/attachment.html>


More information about the Haskell-Cafe mailing list