You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/GUIDE.md
+43-33Lines changed: 43 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1085,7 +1085,7 @@ The following changes will be made to stack.yaml:
1085
1085
- aeson-0.10.0.0
1086
1086
- aeson-compat-0.3.0.0
1087
1087
- attoparsec-0.13.0.1
1088
-
- conduit-extra-1.1.9.2
1088
+
- conduit-extra-1.2.0
1089
1089
- email-validate-2.2.0
1090
1090
- hex-0.1.2
1091
1091
- http-api-data-0.2.2
@@ -1579,8 +1579,9 @@ what needs to be removed:
1579
1579
We've already used `stack exec` used multiple times in this guide. As you've
1580
1580
likely already guessed, it allows you to run executables, but with a slightly
1581
1581
modified environment. In particular: `stack exec` looks for executables on
1582
-
stack's bin paths, and sets a few additional environment variables (like
1583
-
`GHC_PACKAGE_PATH`, which tells GHC which package databases to use).
1582
+
stack's bin paths, and sets a few additional environment variables (like adding
1583
+
those paths to `PATH`, and setting `GHC_PACKAGE_PATH`, which tells GHC which
1584
+
package databases to use).
1584
1585
1585
1586
If you want to see exactly what the modified environment looks like, try:
1586
1587
@@ -1789,7 +1790,7 @@ it. Here is an example:
1789
1790
-}
1790
1791
```
1791
1792
1792
-
## Finding project configs, and the implicit global
1793
+
## Finding project configs, and the implicit global project
1793
1794
1794
1795
Whenever you run something with stack, it needs a `stack.yaml` project file. The
1795
1796
algorithm stack uses to find this is:
@@ -1820,6 +1821,15 @@ configuration. It has no impact on projects at all. Every package you install
1820
1821
with it is put into isolated databases just like everywhere else. The only magic
1821
1822
is that it's the catch-all project whenever you're running stack somewhere else.
1822
1823
1824
+
## Setting stack root location
1825
+
1826
+
`stack path --stack-root` will tell you the location of the "stack root". Among
1827
+
other things, this is where stack stores downloaded programs and snapshot
1828
+
packages. This location can be configured by setting the STACK_ROOT environment
1829
+
variable or passing the `--stack-root` commandline option. It is particularly
1830
+
useful to do this on Windows, where filepaths are limited (MAX_PATH), and things
1831
+
can break when this limit is exceeded.
1832
+
1823
1833
## `stack.yaml` vs `.cabal` files
1824
1834
1825
1835
Now that we've covered a lot of stack use cases, this quick summary of
@@ -1899,21 +1909,6 @@ __Other tools for comparison (including active and historical)__
1899
1909
* [cabal-src](https://hackage.haskell.org/package/cabal-src) is mostly irrelevant in the presence of both stack and cabal sandboxes, both of which make it easier to add additional package sources easily. The mega-sdist executable that ships with cabal-src is, however, still relevant. Its functionality may some day be folded into stack
1900
1910
* [stackage-cli](https://hackage.haskell.org/package/stackage-cli) was an initial attempt to make cabal-install work more easily with curated snapshots, but due to a slight impedance mismatch between cabal.config constraints and snapshots, it did not work as well as hoped. It is deprecated in favor of stack.
1901
1911
1902
-
## More resources
1903
-
1904
-
There are lots of resources available for learning more about stack:
1905
-
1906
-
* `stack --help`
1907
-
* `stack --version` — identify the version and Git hash of the stack executable
1908
-
* `--verbose` (or `-v`) — much more info about internal operations (useful for bug reports)
1909
-
* The [home page](http://haskellstack.org)
1910
-
* The [stack mailing list](https://groups.google.com/d/forum/haskell-stack)
1911
-
* The [the FAQ](faq.md)
1912
-
* The [stack wiki](https://github.com/commercialhaskell/stack/wiki)
1913
-
* The [haskell-stack tag on Stack Overflow](http://stackoverflow.com/questions/tagged/haskell-stack)
1914
-
* [Another getting started with stack tutorial](http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html)
1915
-
* [Why is stack not cabal?](https://www.fpcomplete.com/blog/2015/06/why-is-stack-not-cabal)
1916
-
1917
1912
1918
1913
## Fun features
1919
1914
@@ -1962,11 +1957,11 @@ As a starting point you can use [the "simple" template](https://github.com/comme
1962
1957
An introduction into template-writing and a place for submitting official templates,
1963
1958
you will find at [the stack-templates repository](https://github.com/commercialhaskell/stack-templates#readme).
1964
1959
1965
-
### IDE
1960
+
### Editor integration
1966
1961
1967
-
stack has a work-in-progress suite of editor integrations, to do things like
1968
-
getting type information in Emacs. For more information, see
0 commit comments