Coder Social home page Coder Social logo

Comments (4)

jhrcek avatar jhrcek commented on September 27, 2024 1

I looked into this and it seems that isQuasiQuoteSplice, which is used to recognize TH usage here

used TemplateHaskell = hasS $ not . isQuasiQuoteSplice

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.

nitinprakash96 avatar nitinprakash96 commented on September 27, 2024

+1. Facing same issue.

{-# LANGUAGE TemplateHaskell #-}

module Git where

import qualified GitHash as Git

version :: String
version = Git.giHash $$(Git.tGitInfoCwd)

from hlint.

shayne-fletcher avatar shayne-fletcher commented on September 27, 2024

not sure this is quite ready to be closed. re-opening while unsure.

from hlint.

jhrcek avatar jhrcek commented on September 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.