Coder Social home page Coder Social logo

# operator not accepted about hlint HOT 3 CLOSED

ndmitchell avatar ndmitchell commented on May 27, 2024
# operator not accepted

from hlint.

Comments (3)

ndmitchell avatar ndmitchell commented on May 27, 2024

You can get your code to pass HLint by using:

hlint Sample.hs -XNoUnboxedTuples

There are HSE issues with operators such as (#*:), see http://trac.haskell.org/haskell-src-exts/ticket/195 (however, it's their old bug tracker, so it probably needs reraising on their new one). However, in GHC, the (#) operator is not accepted with the UnboxedTuples extension, which HLint turns on by default. In general I turn on many extensions to accept more code, which has the cost of rejecting some normal programs. Is (#) the real example you were using, or did you reduce it first? I can't find that operator in the Lens library (but can find a zillion lens operators which HSE does invalidly reject).

In general, I think HSE are happy with bugs coming originally from HLint, although you might want to @ndmitchell me on them.

from hlint.

mdorman avatar mdorman commented on May 27, 2024

That was actually what I was working with; I can't imagine how you weren't able to find it, lens being such a small package and all. :) http://hackage.haskell.org/package/lens-4.0.4/docs/Control-Lens-Review.html is where it's documented.

Anyway, it sounds like this particular instance probably isn't actually a bug in hlint or HSE, it's just a particular design choice for the default behavior?

from hlint.

ndmitchell avatar ndmitchell commented on May 27, 2024

Yep, for (#) it's a design choice. However, given that a large and popular language uses # as an operator, and that HSE gets # prefixed operators wrong, I'm inclined to remove UnboxedTuples from the default list of extensions. My guess is that most code which actually uses that extension declares it in a LANGUAGE pragma, so will still work fine.

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.