New stack library - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Bolt

What's the command to start a new stack library?

Jack Henahan

stack new works, I think, unless you want one of these templates: https://github.com/commercialhaskell/stack-templates?files=1

Project templates for stack new. Contribute to commercialhaskell/stack-templates development by creating an account on GitHub.
Gabriel Lebec

FWIW I have aliased a stacknew command which is pinned to a particular resolver, so I benefit from more caching of compiled deps.

alias stacknew='stack new --resolver=lts-14.13'

Then I use it with a project name and template name (from Jack's link above).

stacknew my-cool-project simple-hpack

Got this trick from someone else but I've since forgotten who! :upside_down: