Ignoring ANN Module "HLint: ..."

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignoring ANN Module "HLint: ..."

Moritz Angermann-2
Hi *,

can we detect annotations like `{-# ANN module "HLint: ignore Reduce duplication" #-}` easily?
Right now this will result (without -fexternal-interpreter or a stage2 compiler) in

  Ignoring ANN annotation, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi

However, I do not see why this should require the external interpreter at all. This looks to me
more like an informational comment?

Cheers,
 Moritz
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring ANN Module "HLint: ..."

Brandon Allbery
On Sun, Sep 24, 2017 at 1:44 AM, Moritz Angermann <[hidden email]> wrote:
can we detect annotations like `{-# ANN module "HLint: ignore Reduce duplication" #-}` easily?
Right now this will result (without -fexternal-interpreter or a stage2 compiler) in

  Ignoring ANN annotation, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi

However, I do not see why this should require the external interpreter at all. This looks to me
more like an informational comment?

As I understand it, ANNotations are intended for use with ghc plugins; hlint's use of them is not *quite* an abuse, since it is relying on haskell-src-exts handling of them rather than ghc's. 

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring ANN Module "HLint: ..."

Moritz Angermann-2

> On Sep 24, 2017, at 1:48 PM, Brandon Allbery <[hidden email]> wrote:
>
> On Sun, Sep 24, 2017 at 1:44 AM, Moritz Angermann <[hidden email]> wrote:
> can we detect annotations like `{-# ANN module "HLint: ignore Reduce duplication" #-}` easily?
> Right now this will result (without -fexternal-interpreter or a stage2 compiler) in
>
>   Ignoring ANN annotation, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi
>
> However, I do not see why this should require the external interpreter at all. This looks to me
> more like an informational comment?
>
> As I understand it, ANNotations are intended for use with ghc plugins; hlint's use of them is not *quite* an abuse, since it is relying on haskell-src-exts handling of them rather than ghc's.
>
Hi Brandon,

I did not mean to imply abuse here.  Just that this kind of annotation should not trigger the external interpreter
route (if given).  While this might not have much of an impact with stage2 compilers, where the interpreter and
the compiler are essentially the same.  But in cases where this is not the case (read: external interpreter, possibly
on a different machine).  This results in unnecessary roundtrips, as far as I can see.

As such I’m wondering if we could teach GHC to ignore those easily?

Cheers,
 Moritz

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring ANN Module "HLint: ..."

Brandon Allbery
On Sun, Sep 24, 2017 at 1:51 AM, Moritz Angermann <[hidden email]> wrote:
> As I understand it, ANNotations are intended for use with ghc plugins; hlint's use of them is not *quite* an abuse, since it is relying on haskell-src-exts handling of them rather than ghc's.

I did not mean to imply abuse here.  Just that this kind of annotation should not trigger the external interpreter

I didn't either, really; the main point is that ghc expects annotations to be related to plugins, which *would* require the interpreter.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs