Giter Site home page Giter Site logo

Comments (9)

swsnr avatar swsnr commented on September 23, 2024

I do not know either. I'll need more information that “doesn't work at all” to say anything reasonable.

from flycheck-haskell.

mrkkrp avatar mrkkrp commented on September 23, 2024

Understandable, I'll do additional investigation when I have time.

from flycheck-haskell.

mrkkrp avatar mrkkrp commented on September 23, 2024

Hmm, take file src/Stack/Fetch.hs. If I edit something in the beginning of document, Flycheck works. About line 66, Flycheck stops to response to my edits. Message buffer does not contain anything of interest. How do I debug it? Can you clone the repo and try yourself?

from flycheck-haskell.

swsnr avatar swsnr commented on September 23, 2024

@mrkkrp Uhm, a first step would be to see what checker Flycheck actually uses, e.g. by M-x flycheck-verify-setup. Then try to run the checker with M-x flycheck-compile. It's probably just taking a long time to check, since it'll build all dependent modules on the first check, too.

You can also wait for me to try, but that'll take long time. I'm not using Haskell currently—Rust and Elixir have recently caught my attention—and this issue has a low priority for me personally. It'll likely take a long time before I find the time and motivation to actually sit down and try it. Sorry.

from flycheck-haskell.

mrkkrp avatar mrkkrp commented on September 23, 2024

@lunaryorn, It's all right, I'll try to find out what's going on myself.

from flycheck-haskell.

mrkkrp avatar mrkkrp commented on September 23, 2024

First of all, flycheck-verify-setup told me that after recent chaning of PATH variable hlint is no longer on my PATH. Good catch, but this cannot be cause on this problem.

flycheck-compile however showed this (alignment added):

stack ghc -- -Wall -no-link -outputdir
/tmp/flycheck-haskell-ghc-cache60927MI
-XHaskell2010
-i/home/mark/projects/programs/haskell/stack/dist/build
-i/home/mark/projects/programs/haskell/stack/dist/build/autogen
-i/home/mark/projects/programs/haskell/stack/dist/build/stack/stack-tmp
-i/home/mark/projects/programs/haskell/stack/src/
-i/home/mark/projects/programs/haskell/stack/src/main
-i/home/mark/projects/programs/haskell/stack/src/test
-i/home/mark/projects/programs/haskell/stack/src/
-Wall -DMIN_VERSION_base\(a\,b\,c\)\=\(a\<\=4\&\&b\<\=8\&\&c\<\=0\)
-cpp -x hs /home/mark/projects/programs/haskell/stack/src/Stack/Fetch.hs

/home/mark/projects/programs/haskell/stack/src/Network/HTTP/Download/Verified.hs:33:8:
    Ambiguous module name ‘Crypto.Hash’:
      it was found in multiple packages:
      cryptonite-0.6@crypt_1A87AV0e5C8BaBsLLV3mNF cryptohash-0.11.6@crypt_5epyAhdyCoGIBkp2icUC24

/home/mark/projects/programs/haskell/stack/src/Stack/Types/Config.hs:54:18:
    Could not find module ‘Paths_stack’
    it is a hidden module in the package ‘stack-0.1.7.0@stack_HkplmoJrUgzABAqObuOfsF’
    Use -v to see a list of the files searched for.

Compilation exited abnormally with code 1 at Fri Nov  6 16:39:01

I've opened an issue on Stack, see commercialhaskell/stack#1300.

from flycheck-haskell.

mrkkrp avatar mrkkrp commented on September 23, 2024

Here is what maintainer of Stack says:

This is an issue with flycheck — it isn't passing the -package flags which restrict the set of packages to just the ones that the project depends on.

Also, it looks like it's using cabal's dist directory, so it won't find the Paths_stack.hs file in autogen.

In case you don't intend to work on this, should I try to prepare a pull request fixing these things? Any advice where to look and what to change would be helpful too.

from flycheck-haskell.

swsnr avatar swsnr commented on September 23, 2024

I'd have thought that stack ghc did that for us, but apparently not.

I think you'd need to extend this project to add -package flags for all dependencies to flycheck-ghc-args. We probably already extract the dependencies from Cabal files, but I think we currently ignore them.

And you'd have to extend this project add whatever directory contains Paths_stack.hs to the GHC search path.

from flycheck-haskell.

swsnr avatar swsnr commented on September 23, 2024

@mrkkrp I've cherry-picked the corresponding part of #48; the current MELPA should fix this issue.

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.