commercialhaskell / commercialhaskell/stack
Add a command that creates a skeleton script
Open
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
Assessment
This issue has not been assessed yet.