Giter Club home page Giter Club logo

Comments (4)

jneira avatar jneira commented on September 26, 2024 1

Ok, i thing the error comes from hlint (the linter used by hie by default). If you turn off the extension option:

{
    "languageServerHaskell.hlintOn": false
}

the problem is gone. hlint has to parse the module too and not always match the compiler parsing.

from haskell-ide-engine.

mduerig avatar mduerig commented on September 26, 2024

Apparently the upgrade didn't have anything to do with the problem I'm facing. It looks like HIE chokes on my code. To reproduce:

Create a new project with stack init foobar and open with VSCode. Paste the following into src/Lib.hs:

{-# LANGUAGE DeriveFunctor #-}

module Lib where

class ( Functor m ) =>  Mon m  where
    join :: m ( m x ) -> m x


data State s a = State ( s -> ( s, a ))
    deriving Functor

instance Mon ( State s ) where
    join ( State f ) = State $ \s ->
        let
            (ss, ( State g )) = f s
        in
            g ss

qqqq

This causes an error indicator to appear on the last line (qqqq). So far so good. However, removing that line doesn't make the error indicator go away and Lib.hs keeps marked as containing an error. Only after commenting out and in again the whole instance declaration for Mon are things back to normal. At least until I make the next typo...

from haskell-ide-engine.

jneira avatar jneira commented on September 26, 2024

Hi! Sorry for the late response.
I can reproduce the error and it is a pretty weird one. The code is totally correct. It has to be related with some weird syntax handling error in hie... investigating

from haskell-ide-engine.

mduerig avatar mduerig commented on September 26, 2024

Thanks for confirming and providing a workaround. So far I've been hitting the "Haskell: restart HIE" action every now and then.

from haskell-ide-engine.

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.