@@ -4,11 +4,11 @@ what you get when importing [Haskell.nix][]. It might be helpful to
4load the library in the [Nix REPL](../tutorials/development.md#using-nix-repl) to
4load the library in the [Nix REPL](../tutorials/development.md#using-nix-repl) to
5test things.
5test things.
7− * [Types](#types) — the kinds of data that you will encounter working with [Haskell.nix][].
7+ * [Data structures](#data-structures) — the kinds of data that you will encounter working with [Haskell.nix][].
8 * [Top-level attributes](#top-level-attributes) — Functions and derivations defined in the Haskell.nix attrset.
8 * [Top-level attributes](#top-level-attributes) — Functions and derivations defined in the Haskell.nix attrset.
9 * [Package-set functions](#package-set-functions) — Helper functions defined on the `hsPkgs` package set.
9 * [Package-set functions](#package-set-functions) — Helper functions defined on the `hsPkgs` package set.
11−# Types
11+# Data structures
13## Package Set
13## Package Set
@@ -116,6 +116,64 @@ will be passed to it:
117# Top-level attributes
117# Top-level attributes
121+Function that accepts attribute set with a `src` attribute and looks for `stack.yaml` file relative to it.
123+If file exists, it calls [stackProject](#stack-project) function. Otherwise it will call [cabalProject](#cabal-project) function.
128+pkgs.haskell-nix.project {
129+ # 'cleanGit' cleans a source directory based on the files known by git
130+ src = pkgs.haskell-nix.haskellLib.cleanGit {
131+ name = "haskell-nix-project";
139+A function calling [callStackToNix](#callStackToNix) with all arguments.
141+Then feeding its result into [mkStackPkgSet](#mkStackPkgSet) passing also
142+`pkg-def-extras` and `modules` arguments.
146+| Attribute | Type | Description |
147+|-------------------|--------------------------------------------------|----------------------------------------------------------------------------|
148+| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
149+| `pkg-set` | Attrset | [`pkgSet`](#package-set) |
150+| `stack-nix` | | `projectNix` attribute of [`callStackToNix`](#callStackToNix) return value |
151+| `shellFor` | Function | [`shellFor`](#shellFor) |
152+| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcWithHoogle) |
153+| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcWithPackages) |
158+A function calling [callCabalProjectToNix](#callCabalProjectToNix) with all arguments.
160+Then feeding its result into [mkStackPkgSet](#mkStackPkgSet) passing also
161+`pkg-def-extras`, `extra-hackages` and `modules` arguments.
165+| Attribute | Type | Description |
166+|-------------------|--------------------------------------------------|-----------------------------------------------------------------------------|
167+| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
168+| `pkg-set` | Attrset | [`pkgSet`](#package-set) |
169+| `plan-nix` | | `projectNix` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
170+| `index-state` | | `index-state` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
171+| `shellFor` | Function | [`shellFor`](#shellfor) |
172+| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
173+| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
119## mkStackPkgSet
177## mkStackPkgSet
121Creates a [package set](#package-set) based on the `pkgs.nix` output
179Creates a [package set](#package-set) based on the `pkgs.nix` output