-
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.yaml
file, which will be used by Stack's in-built version of Hpack to generate a corresponding.cabal
file. 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-template
other than it does not provide apackage.yaml
file but provides a.cabal
file directly. -
simple
: Provides only a 'hello world' executable insrc/Main.hs
. Does not provide apackage.yaml
file but provides a.cabal
file directly. -
simple-hpack
: Equivalent tosimple
other than it provides apackage.yaml
file, which will be used by Stack's in-build version of Hpack to generate a corresponding.cabal
file. -
simple-library
: Equivalent tokurt
other than it does not provide a test executable.
-
rio
: provides a library, executable, and test suite based on therio
library. 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/postgres
yesodweb/mysql
yesodweb/sqlite
yesodweb/mongo
-
yesodweb/simple
- no database at all, and no authentication support -
yesodweb/minimal
- bare bones scaffold, also doesn't supportyesod devel