Re: [Haskell] Treatment of unknown pragmas

2018-12-02 Thread Neil Mitchell
Hi all, I've just released HLint 2.1.11 which supports three different forms of pragma as per https://github.com/ndmitchell/hlint#ignoring-hints, so you can write: * {-# ANN module "HLint: ignore Eta reduce" #-} * {-# HLINT ignore "Eta reduce" #-} * {- HLINT ignore "Eta reduce" -} The last two a

Re: [Haskell] Treatment of unknown pragmas

2018-10-28 Thread Artem Pelenitsyn
Hello Daniel, Annotations API was discussed earlier in this thread. Main points against are: Neil: Significant compilation performance penalty and extra recompilation. ANN pragmas is what HLint currently uses. Brandon: The problem with ANN is it's part of the plugins API, and as such does things

Re: [Haskell] Treatment of unknown pragmas

2018-10-27 Thread Daniel Wagner
I don't have a really strong opinion, but... isn't this (attaching string-y data to source constructs) pretty much exactly what GHC's annotation pragma is for? ~d On Tue, Oct 16, 2018 at 3:14 PM Ben Gamari wrote: > Vladislav Zavialov writes: > > > What about introducing -fno-warn-pragma=XXX? Pe

Re: [Haskell] Treatment of unknown pragmas

2018-10-16 Thread Ben Gamari
Vladislav Zavialov writes: > What about introducing -fno-warn-pragma=XXX? People who use HLint will > add -fno-warn-pragma=HLINT to their build configuration. > A warning flag is an interesting way to deal with the issue. On the other hand, it's not great from an ergonomic perspective; afterall,

Re: [Haskell] Treatment of unknown pragmas

2018-10-16 Thread Matthew Pickering
I like the suggestion of a flag. For any realistic compilation you have to pass a large number of flags to GHC anyway. `stack`, `cabal` or so on can choose to pass the additional flag by default if they wish or make it more ergonomic to do so. On Tue, Oct 16, 2018 at 7:58 PM Jared Weakly wrote: >

Re: [Haskell] Treatment of unknown pragmas

2018-10-16 Thread Simon Peyton Jones via Haskell
I rather agree. We don't even need a convention do we? /Any/ comment in {- -} is ignored by GHC /except/ {-# ... #-}. So tool users are free to pick whatever convention they like to identify the stuff for their tool. Simon | -Original Message- | From: ghc-devs On Behalf Of Ben Gamari