[Haskell-cafe] FIXME pragma

Christopher Done chrisdone at gmail.com
Mon May 18 09:20:27 UTC 2015


Nice idea! I didn't know reportWarning existed. Very cool.

On 18 May 2015 at 04:47, Richard Eisenberg <eir at cis.upenn.edu> wrote:

> -1
>
> I like the idea of having GHC spit out warnings and such of this form, but
> this is so straightforward to do with Template Haskell:
>
> $([] <$ reportWarning "Fix this function!")
>
> You could do something similar in terms, spitting out `id` instead of an
> empty list of declarations. (You'd have to be careful where you do this,
> admittedly.)
>
> If it's this easy to do in userland without affecting the compiler, let's
> do it that way. And, even better, with some library support, you could
> customize this behavior in all sorts of ways.
>
> Richard
>
> On May 17, 2015, at 4:10 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
>
> > On 17/05/15 19:42, Christopher Done wrote:
> >> What's the feeling on having a FIXME pragma so that I can attach
> >> warnings to unfinished things?
> >>
> >> |{-# FIXME foo "Reasons here." #-}|
> >>
> >> I would use the WARNING pragma but that doesn't work within a module and
> >> only triggers on use. Compiler errors are the one thing I and everyone
> >> else pays attention to, it would be very handy to have more control over
> >> things GHC reports to the developer to aid development.
> >
> > +1. I actively use WARNING in such cases, and I'd prefer the warning to
> > be reported at the definition site.
> >
> > It'd also be great to allow this pragma anywhere in the code, but I
> > realize it'd complicate the parser.
> >
> > Roman
> >
> > _______________________________________________
> > 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/20150518/37e190b8/attachment.html>


More information about the Haskell-Cafe mailing list