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: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,20 @@ cabal install
60
60
61
61
Any module that is meant to be consumed as a library needs to be listed in the `exposed-modules`. Any module that is not listed there are considered to be private modules.
62
62
63
+
The `package.yaml` is also where you list new Haskell packages. For example if you want to get the `algebraic-graphs` library, you basically use:
64
+
65
+
```yaml
66
+
dependencies:
67
+
- base >= 4.7 && < 5
68
+
- algebraic-graphs >= 0.2 && < 0.3
69
+
```
70
+
71
+
Then you use `cabal2nix` again and you re-enter the shell.
72
+
73
+
Note that Haskell dependency constraints and versions when using `cabal2nix` is not determined by your `package.yaml`, but instead by the Nixpkgs hash located in `pkgs.nix`.
74
+
75
+
Remember that Haskell package versions conventionally use `Major.Major.Minor.Patch`. For more information see: https://pvp.haskell.org/
76
+
63
77
## Using GHCi (or `cabal repl` or `stack ghci`)
64
78
65
79
The `cabal repl` only works against the build targets specified in the `package.yaml`. You have to specify the target name:
0 commit comments