summaryrefslogtreecommitdiff
path: root/lib/fixed-points.nix (follow)
Commit message (Expand)AuthorAgeFilesLines
* treewide: fix typosPeder Bergebakken Sundt2025-06-021-1/+1
* docs: make sample code valid Nix expressionsValentin Gagarin2024-11-081-6/+18
* lib.fixedPoints.toExtension: improve documentation•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>Yueh-Shun Li2024-09-141-9/+8
* lib.fixedPoints.toExtension: Improve type ••• This makes the type more informative and general - closer to how the function behaves, particularly in isolation. Co-authored-by: Yueh-Shun Li <shamrocklee@posteo.net>Robert Hensing2024-09-141-2/+11
* lib.toExtension: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Yueh-Shun Li2024-09-141-0/+64
* Apply suggestions from code review•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>Johannes Kirschbauer2024-09-111-4/+4
* format: lib/fixed-pointsJohannes Kirschbauer2024-08-151-24/+33
* doc: refactor documentation for lib.{composeExtensions,composeManyExtensions}Johannes Kirschbauer2024-08-151-27/+62
* doc: migrate lib.fixedPoints to doc-comment formatJohannes Kirschbauer2024-05-171-32/+120
* lib.fixedPoints: fix rendering of docs for `extends`DS2024-02-291-7/+6
* Merge pull request #248220 from infinisil/document-extends•••Improve the documentation of `lib.extends` and how it relates to overlaysSilvan Mosberger2024-01-121-23/+136
|\
| * lib.fixedPoints.extends: Doc improvements•••Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io> Silvan Mosberger2023-09-281-12/+71
| * lib.fixedPoints.extends: Refactor implementation and document arguments•••- Better names: - self -> final - super -> prev - rattrs -> f - f -> overlay - Add documentation to the function arguments - Add some spacing Silvan Mosberger2023-08-101-1/+14
| * lib.fixedPoints.extends: Add type and examplesSilvan Mosberger2023-08-101-0/+20
| * lib.fixedPoints.extends: Improve documentation•••The previous one was unnecessarily confusing. Silvan Mosberger2023-08-101-23/+44
* | lib/fixed-points.nix: correct typo•••Corrects a minor typo in the description of `fix`; namely that `fix` allows factoring out syntactic recursion from another function.Alexander Groleau2023-10-311-1/+1
* | lib.fix: Improve doc more•••Done together in and after the docs team meeting Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Silvan Mosberger2023-10-121-14/+24
* | lib.fix: Improve doc•••The original doc did not help with understanding at all, and the wikipedia link was actively harmful. Robert Hensing2023-07-081-9/+49
|/
* doc: Render lib.fixedPointsRobert Hensing2023-07-081-81/+115
* lib: make extender available on self-referencesChris Hodapp2023-01-151-2/+2
* lib.compose{Many,}Extensions: Make compatible with nix flake checkShea Levy2021-08-261-5/+5
* lib: Add composeManyExtensionsJoe Hermaszewski2020-11-131-1/+10
* lib.converge: optimiseAlyssa Ross2019-04-171-3/+6
* bundlerEnv: ensure dependencies always included•••Suppose I have a Gemfile like this: source "https://rubygems.org" gem "actioncable" gem "websocket-driver", group: :test The gemset.nix generated by Bundix 2.4.1 will set ActionCable's groups to [ "default" ], and websocket-driver's to [ "test" ]. This means that the generated bundlerEnv wouldn't include websocket-driver unless the test group was included, even though it's required by the default group. This is arguably a bug in Bundix (websocket-driver's groups should probably be [ "default" "test" ] or just [ "default" ]), but there's no reason bundlerEnv should omit dependencies even given such an input -- it won't necessarily come from Bundix, and it would be good for bundlerEnv to do the right thing. To fix this, filterGemset is now a recursive function, that adds dependencies of gems in the group to the filtered gemset until it stabilises on the gems that match the required groups, and all of their recursive dependencies. Alyssa Ross2018-12-111-0/+10
* lib/fixed-points.nix: add an example for extends••• - helped me understand how extends works, hopefully it can help others too Eric Wolf2018-11-211-0/+12
* Revert "Merge branch 'improved-make-overridable' of git://github.com/ElvishJe...•••This reverts commit c3af1210b4c5d7ef380e75add463b37574fdcc8b, reversing changes made to 49f175cd0c80a39e1d05fc687c4a2a40e0aba58c. Shea Levy2017-09-291-30/+4
* Merge branch 'improved-make-overridable' of git://github.com/ElvishJerricco/n...Shea Levy2017-09-281-4/+30
|\
| * Added `self` views of the interface in `makeExtensibleWithInterface`•••Fixing the `overrideScope` in `haskellpackages`. Will Fancher2017-07-141-14/+29
| * Added `makeExtensibleWithInterface`Will Fancher2017-07-121-4/+15
* | Convert libs to a fixed-point•••This does break the API of being able to import any lib file and get its libs, however I'm not sure people did this. I made this while exploring being able to swap out docFn with a stub in #2305, to avoid functor performance problems. I don't know if that is going to move forward (or if it is a problem or not,) but after doing all this work figured I'd put it up anyway :) Two notable advantages to this approach: 1. when a lib inherits another lib's functions, it doesn't automatically get put in to the scope of lib 2. when a lib implements a new obscure functions, it doesn't automatically get put in to the scope of lib Using the test script (later in this commit) I got the following diff on the API: + diff master fixed-lib 11764a11765,11766 > .types.defaultFunctor > .types.defaultTypeMerge 11774a11777,11778 > .types.isOptionType > .types.isType 11781a11786 > .types.mkOptionType 11788a11794 > .types.setType 11795a11802 > .types.types This means that this commit _adds_ to the API, however I can't find a way to fix these last remaining discrepancies. At least none are _removed_. Test script (run with nix-repl in the PATH): #!/bin/sh set -eux repl() { suff=${1:-} echo "(import ./lib)$suff" \ | nix-repl 2>&1 } attrs_to_check() { repl "${1:-}" \ | tr ';' $'\n' \ | grep "\.\.\." \ | cut -d' ' -f2 \ | sed -e "s/^/${1:-}./" \ | sort } summ() { repl "${1:-}" \ | tr ' ' $'\n' \ | sort \ | uniq } deep_summ() { suff="${1:-}" depth="${2:-4}" depth=$((depth - 1)) summ "$suff" for attr in $(attrs_to_check "$suff" | grep -v "types.types"); do if [ $depth -eq 0 ]; then summ "$attr" | sed -e "s/^/$attr./" else deep_summ "$attr" "$depth" | sed -e "s/^/$attr./" fi done } ( cd nixpkgs #git add . #git commit -m "Auto-commit, sorry" || true git checkout fixed-lib deep_summ > ../fixed-lib git checkout master deep_summ > ../master ) if diff master fixed-lib; then echo "SHALLOW MATCH!" fi ( cd nixpkgs git checkout fixed-lib repl .types ) Graham Christensen2017-09-161-0/+1
|/
* lib: Move fixed-point combinators out of trivial•••Trivia != prelude. This is a better organized and less likely to scare off new contributors. John Ericson2017-05-291-0/+78