-
Notifications
You must be signed in to change notification settings - Fork 111
Home
Welcome to the stack-templates wiki! This wiki is intended to provide access to
information about common Stack project templates you may wish to use.
A different approach was taken to Stack project templates before version 1.9.1 of Stack. You can find information on the original templates at:
https://github.com/commercialhaskell/stack-templates/blob/master/template-info.yaml
The templates available from commercialhaskell are the .hsfiles files listed
at:
https://github.com/commercialhaskell/stack-templates
The commands below require version 1.9.1 of Stack or later.
If the template identifier is template-id, you can create a project called
myproject with command:
stack new myproject template-id
template-id may be a file, URL or remote repository. An example of a
template-id that is a remote repository is yesodweb/simple. That will
correspond to the URL
https://github.com/yesodweb/stack-templates/blob/master/simple.hsfiles.
-
new-template: used by Stack by default, if no alternative template is specified. Provides apackage.yamlfile, which will be used by Stack's in-built version of Hpack to generate a corresponding.cabalfile. Covers an executable (inapp/Main.hs), a library and dependency (insrc/Lib.hs), and a (not implemented) test executable (intest/Spec.hs). -
kurt: named after Will Kurt, the author of the 2018 book Get Programming with Haskell. Equivalent tonew-templateother than it does not provide apackage.yamlfile but provides a.cabalfile directly. -
simple: Provides only a 'hello world' executable insrc/Main.hs. Does not provide apackage.yamlfile but provides a.cabalfile directly. -
simple-hpack: Equivalent tosimpleother than it provides apackage.yamlfile, which will be used by Stack's in-build version of Hpack to generate a corresponding.cabalfile. -
simple-library: Equivalent tokurtother than it does not provide a test executable.
-
rio: provides a library, executable, and test suite based on theriolibrary. Provides built in logging and command line parsing support.
Yesod provides many different flavors of its scaffold depending on which database (if any) you wish to use.
yesodweb/postgresyesodweb/mysqlyesodweb/sqliteyesodweb/mongo-
yesodweb/simple- no database at all, and no authentication support -
yesodweb/minimal- bare bones scaffold, also doesn't supportyesod devel