"Merge-buddy" response

2023-12-04 Thread Alan & Kim Zimmerman
Hi all If you recall I asked a while back for people to help me get my exact print annotation re-work stack merged. I had a number of people step up to offer their help (Brandon Allbery, Zubin Duggal, Ben Gamari and Alexandre Baldé). Of these, Brandon Allbery really stepped up to the plate. We

Re: Annotating instances

2023-12-04 Thread Moritz Angermann
Any ANN annotation triggers the TH pipeline and makes them really painful to work with, in non-stage2 settings. Lots of Hlint annotations use ANN and then you have iserv be triggered for each module that has an ANN annotation. Luckily Hlint also support HLINT instead which removed the TH

Re: Annotating instances

2023-12-04 Thread Simon Peyton Jones
The whole ANN mechanism is, at root, a good idea. It is pretty generan, and allows annotations to be arbitrary expressions, provided they are in Typable and Data. And they are serialised across

Re: Annotating instances

2023-12-04 Thread Moritz Angermann
I don’t think they do anything specific. They just function as a marker to Hlint to find when parsing the source files. Here is one of the original issues we had: https://github.com/ndmitchell/hlint/issues/1251 Simply by not being ANN, it doesn’t trigger the Templar Haskell machinery and thus

Re: Annotating instances

2023-12-04 Thread Simon Peyton Jones
> I don’t think they do anything specific. Now I am truly baffled! If they don't do anything, why would they be a module at all! Surely they do something? Simon On Mon, 4 Dec 2023 at 11:58, Moritz Angermann wrote: > I don’t think they do anything specific. They just function as a marker to

Re: Annotating instances

2023-12-04 Thread Simon Peyton Jones
> > Luckily Hlint also support HLINT instead which removed the TH pipeline. > Where is this described/documented? All I can see here is > For {-# HLINT #-} pragmas GHC may give a warning about an unrecognised > pragma, which can be suppressed with

Re: Annotating instances

2023-12-04 Thread Moritz Angermann
I see. That’s where the confusion comes from. Hlint uses them to allow ignoring specific Hlint warnings: {-# ANN module "HLint: ignore Use string literal" #-} {- HLINT ignore "Use string literal" -} and similar. One could maybe argue they should have never been ANN pragmas to begin with.

Re: Annotating instances

2023-12-04 Thread Simon Peyton Jones
Ah, so returning to my original question: Where is this described/documented? All I can see here > is... > E.g. is there a HLint user guide? I'm interested in what the annotations can and cannot be. E.g. perhaps ANN could shortcircuit the TH stuff