Skip to content
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

new user experience #1564

Closed
flip111 opened this issue Dec 25, 2015 · 1 comment
Closed

new user experience #1564

flip111 opened this issue Dec 25, 2015 · 1 comment
Milestone

Comments

@flip111
Copy link
Contributor

flip111 commented Dec 25, 2015

Hi i'm a new user of stack. So far i've been really impressed, there are some things though that i'm missing

  1. A command to easily run the program stack run maybe instead of stack exec project
  2. A command to build & run at the same time
  3. stack runghc doesn't do anything .. it's just "stuck" (process running without any output)
  4. A command to add dependencies (instead of editing the cabal file), perhaps stack require JuicyPixels
  5. it's not clear what i can use the templates for / when i should be using which templates. It's missing descriptions

thank you

@mgsloan
Copy link
Contributor

mgsloan commented Dec 28, 2015

I'm glad you're impressed, thanks for the feedback!

(1 / 2) Here's a stack plugin that adds something like this: https://github.com/yamadapc/stack-run . I wouldn't be opposed to adding something similar to stack itself. Though, I'd probably store the default run target in the stack.yaml

(3) That's because this is a pretty straightforward alias for stack exec runghc. When runghc is invoked without input files, it expects a source file on the input. So if you type main = putStrLn "hi", and then press Ctrl+d, it will run that code. It's stuck waiting for input.

(4) While this is a good idea, automatically modifying cabal files is outside the scope of stack. Perhaps if someone writes a good cabal file refactorer as a library, we can consider adding support to stack. It'd be cool to also integrate this with adding to the extra-deps in stack.yaml, something which is covered by #115. So if you do stack require JuicyPixels-3.2.6.4, it would modify both the cabal file and stack.

Another thing to note here is that stack projects can contain multiple packages, and packages have multiple components, each with their own build-depends. So, you'd need to specify which components to add the dependencies to. Maybe something like stack add-dep JuicyPixels my-pkg:lib (the first positional arg is the dep to add, the rest is the components to add it to)

(5) Good idea, split off into #1571

@mgsloan mgsloan added this to the Support milestone Dec 28, 2015
@mgsloan mgsloan closed this as completed Dec 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants