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
have cabal init
create Main.hs
#2304
Comments
/cc @byorgey |
This feature would of course need to work well with #1989. |
In my understanding, Aside from original purpose, I think if |
Yes, I don't think this really fits with the purpose of |
@byorgey, you're right. I realize that Maybe I should seriously look into using |
@cdepillabout , if |
That's true, I'll look into doing that. |
Is the purpose really to cabalize existing non-cabal projects? I might be wrong but I feel starting new projects with "cabal init" has to be a way more common use-case. Creating a working project from "cabal init" seems like a very nice thing to have, especially for beginners. |
Perhaps |
I think @23Skidoo's ideas of two modes is a good. Personally, "cabalize" an existing project is by far my most common use case. |
Two modes...could be okay. I'm a little iffy on it. The overloading of commands is already getting to be a bit much. I'm the opposite of @erikd - cabal init is usually my first command. It's possible that an official templating function could help here. Some exist already but aren't widely known. |
@bitemyapp, I'm the same as you. As for a templating function, have you tried What I'd like more than a templating function is just something that creates |
I'm not actually sure why it would need two different modes. While I think cabal init is probably most common use-case, this seems like an improvement for both uses. When "cabalizing" a project, I imagine you'd already have a main that already exists, so this wouldn't affect things. If you didn't, I imagine you'd need to create one as well. Re: hi templating, I'd like it if cabal just did templating. I know lein (Clojure) does it, and I believe it's being considered by Cargo (rust) as well. |
Well, perhaps you are all right, having |
This has been implemented and merged in #2483. Thanks! |
I often use
cabal init
when creating a new package, often before I've even started writing any code. Usingcabal-install
version 1.20.0.4, it doesn't seem likecabal init
will createMain.hs
for you, even if it doesn't already exist.It would be nice
cabal init
created a short Main.hs for you, if it doesn't already exist.Ideally, I'd like to be able to have the following workflow:
If I were to send a pull request for this, would there be any interest in it?
The text was updated successfully, but these errors were encountered: