hpack
hpack copied to clipboard
Feature request: Add `hpack init` command
Something like hpack init which will be an equivalent of cabal init would be nice to have.
@sol Simon, if you aren't opposed to the feature, I will try to implement it myself. Let me know.
My issue here is that at that point I would also set the convention on how a Haskell package should be structured.
I'm very opinionated about this:
- source files into
src - test files into
test - Using
hspecfor tests, with test driver intest/Spec.hs(usinghspec-discover) - etc.
(basically exactly like https://github.com/hspec/hspec-example)
BUT: Even though I think these conventions make sense, I still want hpack to be useful for people who don't agree with these conventions. This is why I'm tempted to not add hpack init (even though I would love to use it myself).
Project initialization may better be served by a standalone project, unix-style (to prevent tying, or more fittingly illegal bundling as @soenkehahn once called it).
stack new can do this. It draws from stack-templates. Or you could use hi if you don't like Stack.
+1 for this (even if it's just a parametrized template for use with some other tool like hi or stack). Right now I don't really know what options I need to have in my YML to get started with a minimal project.
There are two things a hpack init could do:
- Scaffold a project (like
stack newandhi) - Generate a
package.yamlfrom an existing.cabalfile
While this thread seems to be about (1), I would be very interested in (2).
That's what hpack-convert did, but it hasn't been updated in a while.