-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Dependencies
aidandenlinger edited this page Nov 9, 2022
·
2 revisions
We're using Stack, a Haskell project manager. Adding dependencies is documented here, but it was a bit of a pain to really piece it together. I'm noting what worked for me here
- Check Stackage LTS 19.32 to see if the package is there. If it is, then the package is already included and we don't need to change the
stack.yaml
.- If it isn't in the stackage, you need to add it to
extra-deps
instack.yaml
. You addpackage-name@version
inextra-deps
.
- If it isn't in the stackage, you need to add it to
- Then, go to
package.yaml
and add- package-name
underdependencies
. In most cases this should go underlibrary
's dependencies to access it from thesrc
folder.- If it's needed for
app/Main.hs
it should go underexecutable
- If it's needed for anything in
test
it should go undertest
- If it's needed for
- If all goes well, it should successfully build with
stack build
, or run withstack run
, or test withstack test
.