tomjaguarpaw / tilapia

Improving all Haskell's programmer interfaces
65 stars 2 forks source link

Create stack template(s) for beginners #65

Open MatthijsBlom opened 3 years ago

MatthijsBlom commented 3 years ago

Stack has a few thinks going for it:

(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.

tomjaguarpaw commented 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?

MatthijsBlom commented 3 years ago

[…] 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.

tomjaguarpaw commented 3 years ago

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?

MatthijsBlom commented 3 years ago

That's right.

tomjaguarpaw commented 3 years ago

Yes, I like that idea. Cabal doesn't have anything similar as far as I know.

ketzacoatl commented 3 years ago

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?