Skip to content

Instantly share code, notes, and snippets.

@layus
Created March 5, 2022 22:31
Show Gist options
  • Save layus/7ede511baefc86ba13b31de8687a155e to your computer and use it in GitHub Desktop.
Save layus/7ede511baefc86ba13b31de8687a155e to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. https://github.com/theZiz/aha -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8"/>
<title>stdin</title>
</head>
<body style="color:white; background-color:black">
<pre>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'let order = a: b: if a &lt; b then &quot;before&quot; else &quot;after&quot;; in order &quot;foo&quot; 1'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a string</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="color:#f8f8f2;">: cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a string</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:24</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| let order = a: b: if a &lt; b then &quot;before&quot; else &quot;after&quot;; in order &quot;foo&quot; 1</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [1]; operator = true; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = true; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating the `operator` attribute passed to builtins.genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a Boolean</span><span style="color:#f8f8f2;"> while a function was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = true; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then n+1 else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then n+1 else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating one item to be part of the genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then n+1 else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then {value = n+1;} else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then {value = n+1;} else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating one item to be part of the genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then {value = n+1;} else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then [(n+1)] else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then [(n+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating one item to be part of the genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [1]; operator = n: if n &lt; 5 then [(n+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [{value = 1;}]; operator = n: if n &lt; 5 then [(n+1)] else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> attribute 'key' required</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [{value = 1;}]; operator = n: if n &lt; 5 then [(n+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> While evaluating one of the attribute sets to be part of the genericClosure: attribute `key` required</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [{value = 1;}]; operator = n: if n &lt; 5 then [(n+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [{key = 1; value = 1;}]; operator = n: if n &lt; 5 then [(n+1)] else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="color:#f8f8f2;">: cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:82</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [{key = 1; value = 1;}]; operator = n: if n &lt; 5 then [(n+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure { startSet = [{key = 1; value = 1;}]; operator = n: if n.value &lt; 5 then [(n.value+1)] else []; }'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [{key = 1; value = 1;}]; operator = n: if n.value &lt; 5 then [(n.value+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating one item to be part of the genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">an integer</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure { startSet = [{key = 1; value = 1;}]; operator = n: if n.value &lt; 5 then [(n.value+1)] else []; }</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure false'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a Boolean</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure false</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating the first argument passed to builtins.genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a Boolean</span><span style="color:#f8f8f2;"> while a set was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure false</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure {startSet = {};}'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> while a list was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = {};}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating the `startSet` attribute passed to builtins.genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> while a list was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = {};}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure {startSet = []; operator = false;}'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">[ ]</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating the `operator` attribute passed to builtins.genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a Boolean</span><span style="color:#f8f8f2;"> while a function was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = []; operator = false;}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure {startSet = [{}]; operator = x : x+1;}'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> attribute 'key' required</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = [{}]; operator = x : x+1;}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> While evaluating one of the attribute sets to be part of the genericClosure: attribute `key` required</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = [{}]; operator = x : x+1;}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.genericClosure {startSet = [{key = 1;}]; operator = x : { key = x.key+1;} ;}'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> while a list was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = [{key = 1;}]; operator = x : { key = x.key+1;} ;}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">While evaluating the return value of the `operator` passed to builtins.genericClosure</span><span style="color:#f8f8f2;">: value is </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> while a list was expected</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:1</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.genericClosure {startSet = [{key = 1;}]; operator = x : { key = x.key+1;} ;}</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Command line</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;">nix-instantiate --eval --expr 'builtins.sort (a: b: a &lt; b) (builtins.genericClosure {startSet = [{key = 1;}]; operator = x : if x.key &lt; 5 then [{key=x.key + 1;} { key = x.key * 2;}] else [];})'</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output before</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">─────┬──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;">│ </span>File: <span style="font-weight:bold;">Output after</span>
<span style="color:#404040;">─────┼──────────────────────────────────────────────────────────────────────────</span>
<span style="color:#404040;"> 1</span> <span style="color:#404040;">│</span> <span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">error:</span><span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:fuchsia;"></span><span style="color:#f8f8f2;">: cannot compare </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span><span style="color:#f8f8f2;"> with </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">a set</span>
<span style="color:#404040;"> 2</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 3</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> </span><span style="font-weight:bold;color:#3333FF;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:#3333FF;">at </span><span style="font-weight:bold;color:fuchsia;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:fuchsia;">«string»:1:24</span><span style="color:#f8f8f2;">:</span>
<span style="color:#404040;"> 4</span> <span style="color:#404040;">│</span>
<span style="color:#404040;"> 5</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> 1| builtins.sort (a: b: a &lt; b) (builtins.genericClosure {startSet = [{key = 1;}]; operator = x : if x.key &lt; 5 then [{key=x.key + 1;} { key = x.key * 2;}] else [];})</span>
<span style="color:#404040;"> 6</span> <span style="color:#404040;">│</span> <span style="color:#f8f8f2;"> | </span><span style="font-weight:bold;color:red;"></span><span style="font-weight:bold;color:#f8f8f2;"></span><span style="font-weight:bold;color:red;">^</span>
<span style="color:#404040;">─────┴──────────────────────────────────────────────────────────────────────────</span>
</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment