Skip to content

Commit

Permalink
lib/trivial.nix: fix missing parens
Browse files Browse the repository at this point in the history
Broken in 62dca7c; the tricky thing is that it depends on nix version.
Explanation: NixOS/nix#629
  • Loading branch information
vcunat committed Sep 3, 2018
1 parent 252c0d4 commit 608730a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/trivial.nix
Expand Up @@ -36,18 +36,18 @@ rec {

/* bitwise “and” */
bitAnd = builtins.bitAnd
or import ./zip-int-bits.nix
(a: b: if a==1 && b==1 then 1 else 0);
or (import ./zip-int-bits.nix
(a: b: if a==1 && b==1 then 1 else 0));

/* bitwise “or” */
bitOr = builtins.bitOr
or import ./zip-int-bits.nix
(a: b: if a==1 || b==1 then 1 else 0);
or (import ./zip-int-bits.nix
(a: b: if a==1 || b==1 then 1 else 0));

/* bitwise “xor” */
bitXor = builtins.bitXor
or import ./zip-int-bits.nix
(a: b: if a!=b then 1 else 0);
or (import ./zip-int-bits.nix
(a: b: if a!=b then 1 else 0));

/* bitwise “not” */
bitNot = builtins.sub (-1);
Expand Down

1 comment on commit 608730a

@Profpatsch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahaha, I originally had parens because I was unsure, then I tried it without and it worked, so I left them out.

Please sign in to comment.