commercialhaskell / commercialhaskell/stack

Add a command that creates a skeleton script

Open
#2,677 1 comment 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

For writing scripts, it would be nice if stack could generate a basic script skeleton. I'd imagine the following behaviour:

```
$ stack new-script turtle.hs
$ cat turtle.hs
#!/usr/bin/env stack
{- stack
--resolver lts-7.2
--install-ghc
runghc
--package base
--package turtle
--
-hide-all-packages
-}

{-# LANGUAGE OverloadedStrings #-}

import Turtle

main = echo "Hello World!"
```

The command should pick up `--resolver` and possibly other options similarly to `stack new`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.