@@ -112,16 +112,16 @@ will be passed to it:
113# Top-level attributes
113# Top-level attributes
115−## project
115+## project'
117Function that accepts attribute set with a `src` attribute and looks for `stack.yaml` file relative to it.
117Function that accepts attribute set with a `src` attribute and looks for `stack.yaml` file relative to it.
119−If file exists, it calls [stackProject](#stackproject) function. Otherwise it will call [cabalProject](#cabalproject) function.
119+If file exists, it calls [stackProject](#stackproject') function. Otherwise it will call [cabalProject](#cabalproject') function.
121**Example**:
121**Example**:
124−pkgs.haskell-nix.project {
124+pkgs.haskell-nix.project' {
125 # 'cleanGit' cleans a source directory based on the files known by git
125 # 'cleanGit' cleans a source directory based on the files known by git
126 src = pkgs.haskell-nix.haskellLib.cleanGit {
126 src = pkgs.haskell-nix.haskellLib.cleanGit {
127 name = "haskell-nix-project";
127 name = "haskell-nix-project";
@@ -130,7 +130,7 @@ pkgs.haskell-nix.project {
133−## stackProject
133+## stackProject'
135A function calling [callStackToNix](#callstacktonix) with all arguments.
135A function calling [callStackToNix](#callstacktonix) with all arguments.
@@ -142,14 +142,13 @@ Then feeding its result into [mkStackPkgSet](#mkstackpkgset) passing also
142| Attribute | Type | Description |
142| Attribute | Type | Description |
143|-------------------|--------------------------------------------------|----------------------------------------------------------------------------|
143|-------------------|--------------------------------------------------|----------------------------------------------------------------------------|
144| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
144| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
145−| `pkg-set` | Attrset | [`pkgSet`](#package-set) |
146| `stack-nix` | | `projectNix` attribute of [`callStackToNix`](#callstacktonix) return value |
145| `stack-nix` | | `projectNix` attribute of [`callStackToNix`](#callstacktonix) return value |
147| `shellFor` | Function | [`shellFor`](#shellfor) |
146| `shellFor` | Function | [`shellFor`](#shellfor) |
148| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
147| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
149| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
148| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
152−## cabalProject
151+## cabalProject'
154A function calling [callCabalProjectToNix](#callcabalprojecttonix) with all arguments.
153A function calling [callCabalProjectToNix](#callcabalprojecttonix) with all arguments.
@@ -161,14 +160,18 @@ Then feeding its result into [mkCabalProjectPkgSet](#mkcabalprojectpkgset) passi
161| Attribute | Type | Description |
160| Attribute | Type | Description |
162|-------------------|--------------------------------------------------|-----------------------------------------------------------------------------|
161|-------------------|--------------------------------------------------|-----------------------------------------------------------------------------|
163| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
162| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
164−| `pkg-set` | Attrset | [`pkgSet`](#package-set) |
165| `plan-nix` | | `projectNix` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
163| `plan-nix` | | `projectNix` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
166| `index-state` | | `index-state` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
164| `index-state` | | `index-state` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
167| `shellFor` | Function | [`shellFor`](#shellfor) |
165| `shellFor` | Function | [`shellFor`](#shellfor) |
168| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
166| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
169| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
167| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
169+## project, cabalProject and stackProject
171+These versions of the function are the same as project', cabalProject'
172+and stackProject', but `hsPkgs` attributes are also included in the
173+return value directly. That way a package can be referenced as
174+`(project {...}).foo` instead of `(project' {...}).hsPkgs.foo`.
173## mkStackPkgSet
176## mkStackPkgSet
@@ -404,9 +407,11 @@ Sub-component types identify [components](#component) and are one of:
404 - `tests`
407 - `tests`
405 - `benchmarks`
408 - `benchmarks`
407−# Package-set functions
410+# Project functions
409−These functions exist within the `hsPkgs` package set.
412+These functions are included in the `project` return values.
413+In the past they also existed within `project.hsPkgs`,
414+but have now been removed from there.
411## shellFor
416## shellFor