Comments (9)
I do not know either. I'll need more information that “doesn't work at all” to say anything reasonable.
from flycheck-haskell.
Understandable, I'll do additional investigation when I have time.
from flycheck-haskell.
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.
@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.
@lunaryorn, It's all right, I'll try to find out what's going on myself.
from flycheck-haskell.
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.
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.
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.
@mrkkrp I've cherry-picked the corresponding part of #48; the current MELPA should fix this issue.
from flycheck-haskell.
Related Issues (20)
- flycheck-disable-checked not disabling haskell-stack-ghci HOT 6
- `flycheck-haskell-setup` signals error on Windows HOT 4
- Support for Haskell scripts made with Stack HOT 1
- Using flycheck in a docker-based stack project? HOT 1
- Bug in get-cabal-configuration.hs HOT 2
- call to stack / get-cabal-configuration delays editing file HOT 2
- IO mzero error when reading cabal configuration HOT 2
- cabal new-style builds HOT 1
- running hlint when installed using --copy-compiler-bins HOT 2
- Module ‘Distribution.PackageDescription.Parsec’ does not export ‘readGenericPackageDescription’
- Very bad performance HOT 4
- no errors HOT 7
- Paths_* modules cannot be found HOT 11
- Support hpack files directly HOT 3
- Flycheck with nix: Could not find module HOT 4
- Flycheck-haskell hangs indefinitely on NixOS HOT 6
- weird output from haskell-hlint checker HOT 2
- Support for cabal.project? HOT 1
- flycheck-haskell is very slow when stack.yaml is not pressent HOT 10
- Reference to Distribution.Parsec.Common needs to be updated for Cabal-3.0.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flycheck-haskell.