Forrest logo
back to the stack tool

stack:tldr:26c8b

stack: Create a new package.
$ stack new ${package_name} ${template_name}
try on your machine

The command "stack new ${package_name} ${template_name}" is used to create a new project or package in Haskell using the Stack build tool.

Here's what each part of the command means:

  • "stack" refers to the Stack build tool, which is a command-line tool for managing Haskell projects and packages.

  • "new" is a command in Stack that allows you to create a new project or package.

  • "${package_name}" is a placeholder for the name you want to give to your package or project. You need to replace this placeholder with the actual name you want to use.

  • "${template_name}" is a placeholder for the name of the Stack template you want to use for creating your project or package. Stack provides various templates that serve as starting points for different types of projects or packages. You need to replace this placeholder with the actual name of the template you want to use.

For example, if you want to create a new package named "my-package" using the basic template, you would use the command: "stack new my-package basic".

This command will create a new directory with the specified package or project name and initialize it with the chosen Stack template. It sets up initial files and configurations based on the template, providing a starting point for your Haskell development.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the stack tool