Giter Site home page Giter Site logo

Comments (14)

lukehoersten avatar lukehoersten commented on June 21, 2024

I was able to get things working with Chris Done's flycheck-haskell which uses ghci instead of ghc:

https://github.com/chrisdone/haskell-flycheck

I don't think this runs hlint though.

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@lukehoersten It chains to the built-in hlint checker, so hlint should run either way.

As for the actual issue, please show me the output of C-c ! C-c RET haskell-ghc.

from flycheck-haskell.

lukehoersten avatar lukehoersten commented on June 21, 2024
   13  18 error           Could not find module ‘Control.Monad.Trans.Except’
Perhaps you meant
  Control.Monad.Trans.Cont (from transformers-0.3.0.0)
  Control.Monad.Trans.Error (from transformers-0.3.0.0)
  Control.Monad.Trans.List (from transformers-0.3.0.0)
Use -v to see a list of the files searched for.... (haskell-ghc)

from flycheck-haskell.

lukehoersten avatar lukehoersten commented on June 21, 2024

@chrisdone and I have done some work to bring his chrisdone/haskell-flycheck#1 up to snuff. Basically modern haskell-mode uses haskell-interactive-mode for a REPL which is cabal repl underneath. This unifies sandbox management etc all under one roof. With Chris' haskell-flycheck, it actually shares that cabal repl process for type checking etc. I really think this is the way to go for flycheck-haskell. Also, I think it simplifies a lot of what flycheck-haskell is doing by leveraging cabal repl for it instead (so less for you to maintain). What do you think @lunaryorn?

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@lukehoersten That's the output of the error list, not of C-c ! C-c

With regards to haskell-flycheck: This extension does not actually implement a syntax checker. It merely configures the built-in GHC syntax checker of Flycheck accordingly.

Flycheck itself will never use Haskell Interactive Mode for syntax checking: I want no dependencies on specific 3rd party modes in Flycheck, and it's too much code for me to maintain anyway.

We could merge this extension with Chris' syntax checker, though, and distribute it as one package on MELPA.

But in any case, the standard GHC syntax checker and the functionality provided by this extension will stay. Not everyone uses Interactive Haskell Mode…

from flycheck-haskell.

lukehoersten avatar lukehoersten commented on June 21, 2024
  1. I think we can close this issue. I can't reproduce the issue with the haskell-ghc checker.
  2. The haskell-process stuff is included in haskell-mode. Do you mean you don't want to depend on haskell-mode as a 3rd party mode?

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@lukehoersten Ad 1) Closing as invalid then.

Ad 2) Exactly. I do not want to depend on Emacs Lisp functionality from other modes. That'd open a kitchen sink, and amount to more code than I could reasonably maintain. For this reason, I prefer to have syntax checkers with such dependencies in external packages.

from flycheck-haskell.

lukehoersten avatar lukehoersten commented on June 21, 2024

OK that makes a lot of sense. Can we do what you suggested then and add the haskell-process checker to the flycheck-haskell package? My main motivation is to just get it into emacs package management so installation is easy and having flycheck-haskell and haskell-flycheck will just be confusing for new users.

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@lukehoersten Yes, if @chrisdone agrees.

from flycheck-haskell.

chrisdone avatar chrisdone commented on June 21, 2024

I'm okay with merging this into flycheck-haskell if it unifies a common thing and avoids confusion. I'm concerned about pissing off your users by swapping out the backend with something that requires starting a session and ghci (things that people regularly complain about as being such a chore).

from flycheck-haskell.

lukehoersten avatar lukehoersten commented on June 21, 2024

I was thinking flycheck-haskell would default to it's current behavior and whether by manual config or auto-config on availability of haskell-process, would switch from haskell-ghc checker to haskell-process checker. @chrisdone mentioned on IRC that this would have a conditional dependency, though, which may not be desirable. I'm not sure what's best here.

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@lukehoersten What do you mean with “conditional dependency”? This extension already depends on Haskell Mode.

@chrisdone With a proper predicate, Flycheck won't use the checker unless there is a session already. Is there a function that checks whether the current Haskell Mode has an interactive session attached?

from flycheck-haskell.

chrisdone avatar chrisdone commented on June 21, 2024

There's haskell-session-maybe which returns nil if there is no session.

from flycheck-haskell.

swsnr avatar swsnr commented on June 21, 2024

@chrisdone That looks like the right function to call, i.e. :predicate haskell-session-maybe

from flycheck-haskell.

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.