summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-11-24 12:59:08 +0100
committerPeter Simons <simons@cryp.to>2015-11-25 11:30:43 +0100
commit89a5717c7aa2feb5a275feff1a93685b61a0c7a7 (patch)
treecb36ecf4b93fdb5060b8e5a482c1fa289500ccd6 /lib
parent8d8f8f3c09ef74a0ffd44d05da81cb627040e609 (diff)
downloadnixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar.gz
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar.bz2
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar.lz
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar.xz
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.tar.zst
nixpkgs-89a5717c7aa2feb5a275feff1a93685b61a0c7a7.zip
lib/trivial.nix: improve spelling
Diffstat (limited to 'lib')
-rw-r--r--lib/trivial.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 1683d91dd23..cda8aa08a20 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -13,7 +13,7 @@ rec {
   mergeAttrs = x: y: x // y;
 
   # Compute the fixed point of the given function `f`, which is usually an
-  # attribute set that expects its final, non-recursive repsentation as an
+  # attribute set that expects its final, non-recursive representation as an
   # argument:
   #
   #     f = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }
@@ -29,7 +29,7 @@ rec {
   fix = f: let x = f x; in x;
 
   # A variant of `fix` that records the original recursive attribute set in the
-  # result. This is useful in combination with the `extend` function to
+  # result. This is useful in combination with the `extends` function to
   # implement deep overriding. See pkgs/development/haskell-modules/default.nix
   # for a concrete example.
   fix' = f: let x = f x // { __unfix__ = f; }; in x;
@@ -40,7 +40,7 @@ rec {
   #     g = self: super: { foo = super.foo + " + "; }
   #
   # that has access to the unmodified input (`super`) as well as the final
-  # non-recursive representation of the attribute set (`self`). This function
+  # non-recursive representation of the attribute set (`self`). `extends`
   # differs from the native `//` operator insofar as that it's applied *before*
   # references to `self` are resolved:
   #
@@ -48,7 +48,7 @@ rec {
   #     { bar = "bar"; foo = "foo + "; foobar = "foo + bar"; }
   #
   # The name of the function is inspired by object-oriented inheritance, i.e.
-  # think of it as an infix operator `g extends f` that mimicks the syntax from
+  # think of it as an infix operator `g extends f` that mimics the syntax from
   # Java. It may seem counter-intuitive to have the "base class" as the second
   # argument, but it's nice this way if several uses of `extends` are cascaded.
   extends = f: rattrs: self: let super = rattrs self; in super // f self super;