Comments (4)
I looked into this and it seems that isQuasiQuoteSplice, which is used to recognize TH usage here
Line 428 in b732749
has changed to be more restrictive in recent versions of ghc-lib-praser-ex:
Before GHC 9.6 it included both typed and untyped TH splices, but in ghc >=9.6 it only includes untyped splices:
https://hackage.haskell.org/package/ghc-lib-parser-ex-9.6.0.1/docs/src/Language.Haskell.GhclibParserEx.GHC.Hs.Expr.html#isQuasiQuoteSplice
Compare:
https://hackage.haskell.org/package/ghc-9.4.4/docs/Language-Haskell-Syntax-Expr.html#t:HsSplice
https://hackage.haskell.org/package/ghc-9.6.1/docs/Language-Haskell-Syntax-Expr.html#t:HsUntypedSplice
Not sure how to fix this yet 🤔
EDIT: after banging my head against GHC ast differences I came up with this benign looking fix 😄 #1535
from hlint.
+1. Facing same issue.
{-# LANGUAGE TemplateHaskell #-}
module Git where
import qualified GitHash as Git
version :: String
version = Git.giHash $$(Git.tGitInfoCwd)
from hlint.
not sure this is quite ready to be closed. re-opening while unsure.
from hlint.
@shayne-fletcher I think it's safe to close this issue. I tested my fix with both reproducers and can confirm that the false positive is no longer emitted for either.
from hlint.
Related Issues (20)
- hlint incorrectly suggests renaming shadowed "map" when generalise group is on
- Incorrect redundant backet suggestion with `BlockArguments` and operator sections
- hlint-3.8 fails to compile with ghc-9.8.1 HOT 5
- Recommend `Data.Foldable1` over `Data.List.{maximum,minimum}{,By}`
- Make ignore-glob a config key in .hlint.yaml
- Repeated hint names
- Consider using less morally-loaded language in hints. HOT 3
- Rules for list literals
- `Redundant <$>` should not trigger for lengthy `LambdaCase`
- Use list literal suggestions with `:|`
- hlint -g also checks untracked files
- `cabal install hlint` fails with ghc-9.10.1 HOT 2
- Hlint fails if it encounters any non-UTF8 files
- generate-summary doesn't output html-entities
- Incorrect "Use map" when folding over a `Foldable`
- use `: []` is not correct in the presence of `OverloadedLists`
- Setting Language Disables Other Extensions
- How to ban a single extension
- Functor law hint may be too opinionated HOT 1
- request for support of `ghc-lib-parser` and `ghc-lib-parser-ex` newer versions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hlint.