Skip to content

Commit 1d44533

Browse files
committed
Merge branch 'stable'
2 parents ce65605 + 4ec471f commit 1d44533

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

doc/GUIDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,22 @@ The `runghc` command is still very useful, especially when you're working on a
17711771
project and want to access the package databases and configurations used by
17721772
that project. See the next section for more information on configuration files.
17731773
1774+
### Loading scripts in ghci
1775+
1776+
Sometimes you want to load your script in ghci REPL to play around with your
1777+
program. In those cases, you can use `exec ghci` option in the script to achieve
1778+
it. Here is an example:
1779+
1780+
```
1781+
#!/usr/bin/env stack
1782+
{- stack
1783+
--resolver lts-8.2
1784+
--install-ghc
1785+
exec ghci
1786+
--package text
1787+
-}
1788+
```
1789+
17741790
## Finding project configs, and the implicit global
17751791
17761792
Whenever you run something with stack, it needs a `stack.yaml` project file. The

doc/build_command.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ of different syntaxes supported for this list:
8686

8787
* `packagename:comptype:compname` is the most explicit. The available
8888
comptypes are `exe`, `test`, and `bench`.
89+
* Side note: When any `exe` component is specified, all of the package's executable components will be built. This is due to limitations in all currently released versions of Cabal. See [issue#1046](https://github.com/commercialhaskell/stack/issues/1406)
8990
* `packagename:compname` allows you to leave off the component type, as
9091
that will (almost?) always be redundant with the component name. For
9192
example, `stack build mypackage:mytestsuite`.

0 commit comments

Comments
 (0)