Open MatthijsBlom opened 3 years ago
Oh, very interesting idea. I don't use Stack and I had no idea that these templates existed! I've never heard of anything like this for cabal. Do the templates have deep integration with Stack or would some lightweight mustache-like templactes do a similar job for cabal?
[…] Do the templates have deep integration with Stack
Well, templates are inherently single-use per project, but initialization of stack projects with stack new
always use a template. Trying it for yourself is very easy: just install stack and run stack new ProjectName
. You can compare the result with the source of the default template. See also the relevant section of the Stack user guide.
or would some lightweight mustache-like templactes do a similar job for cabal?
I wouldn't know, as I do not yet know Mustache.
Ah, I see. It sounds like you are suggesting creating templates that a new user can use like stack new myproject tilapia/minimal-executable
or stack new myproject tilapia/simple-library
. Is that right?
That's right.
Yes, I like that idea. Cabal doesn't have anything similar as far as I know.
How would these new templates differ from https://github.com/commercialhaskell/stack-templates/blob/master/simple-library.hsfiles and https://github.com/commercialhaskell/stack-templates/blob/master/simple.hsfiles, or are those sufficiently useful as-is?
Stack has a few thinks going for it:
stack.yaml
), every file is fully customizable, and could therefore be supplied with notes tailored to beginners.(Does Cabal have similar functionality?)
I propose a series of templates be produced, from, say, a minimal executable, to a simple library, to more typical projects, to a grand tour of stack exotica.
I'm curious to hear what you think.
See commercialhaskell/stack-templates for basic instructions.
The Stack user guide suggests publishing of templates is very easy; more difficult will be making sure people know they exist – and writing them, of course.