Skip to content

Commit 2815371

Browse files
committed
Expr.Types: add notes to data {Params:ParamSet, NExprF:NSelect}
Some improvement ideas. Grew to not like to put such in reports, since they get lost there and one can implement them while at hand in the topic. (probably would do this during breakage writing phase).
1 parent fc63808 commit 2815371

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Nix/Expr/Types.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ data Params r
108108
--
109109
-- > Param "x" ~ x
110110
| ParamSet !(ParamSet r) !Bool !(Maybe VarName)
111+
-- 2021-05-15: NOTE: Seems like we should flip the ParamSet, so partial application kicks in for Bool?
112+
-- 2021-05-15: NOTE: '...' variadic property probably needs a Bool synonym.
111113
-- ^ Explicit parameters (argument must be a set). Might specify a name to
112114
-- bind to the set in the function body. The bool indicates whether it is
113115
-- variadic or not.
@@ -432,6 +434,8 @@ data NExprF r
432434
-- > NBinary NPlus x y ~ x + y
433435
-- > NBinary NApp f x ~ f x
434436
| NSelect !r !(NAttrPath r) !(Maybe r)
437+
-- 2021-05-15: NOTE: Default value should be first argument to leverage partial application.
438+
-- Cascading change diff is not that big.
435439
-- ^ Dot-reference into an attribute set, optionally providing an
436440
-- alternative if the key doesn't exist.
437441
--

0 commit comments

Comments
 (0)