-
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 on common templates you may wish to use. We're in the process of converting over to this Wiki from the original stack templates
approach used in Stack 1.7 and earlier. You can still find information on the original templates at:
https://github.com/commercialhaskell/stack-templates/blob/master/template-info.yaml
Or check out the raw list of templates available from commercialhaskell at:
https://github.com/commercialhaskell/stack-templates
The commands below require stack 1.9. If the template identifier is template-id
, you can create a project called myproj
with:
$ stack new myproj template-id
template-id
may be a file, url or remote repository. For the latter case, an example may be yesodweb/simple
, which will correspond to https://github.com/yesodweb/stack-templates/blob/master/simple.hsfiles.
Note: There is currently a bug on Windows which means github templates must be preceded by github:
e.g. github:yesodweb/simple
.
-
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