Skip to content

Support for stack scripts #2201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fyusuf-a opened this issue Sep 16, 2021 · 4 comments
Closed

Support for stack scripts #2201

fyusuf-a opened this issue Sep 16, 2021 · 4 comments
Labels

Comments

@fyusuf-a
Copy link

It is possible to execute a stack program outside of a stack project and with only one file using the lines provided in the documentation. Would it be possible to implement support for this in your project ?

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.2.0.0 (GHC: 8.8.4) (PATH: /home/fyusuf-a/.cabal/store/ghc-8.8.4/haskell-language-server-1.2.0.0-e-haskell-language-server-3fd296f99d374f7cd5ffa3f1119c810ac75c1cf90b40963ae8d113fadbfa9dc5/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:		3.3.0.0
stack:		2.7.3
ghc:		8.8.4

Which OS do you use:
Ubuntu
Which lsp-client do you use:
Neovim with coc.nvim

Describe your project (alternative: link to the project):

Content of Main.hs :

#!/usr/bin/env stack
-- stack script --resolver lts-12.21 --package async

import Control.Concurrent.Async
import Data.Foldable (traverse_)

main = undefined

Steps to reproduce

chmod +x Main.hs
./Main.hs

Expected behaviour

No linting for errors should happen.

Actual behaviour

The haskell-language-server should report no error.

@jneira
Copy link
Member

jneira commented Sep 16, 2021

hi, thanks for reporting the issue
we have an issue about here #111
you can read it there is no workaround for now and a linked issue in stack which will enable it

@jneira
Copy link
Member

jneira commented Sep 16, 2021

so I am gonna close it if you don't mind, you can track the progress in the mentioned issue

@jneira jneira closed this as completed Sep 16, 2021
@fyusuf-a
Copy link
Author

Sorry I have missed this issue.

@jneira
Copy link
Member

jneira commented Sep 16, 2021

dont worry, it serves as a signal people is hitting the issue and need the fix 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants