query
On this page

bitOr

lib.trivial.bitOr

Primop
Docs pulled from | This Revision | about 23 hours ago


Nix manual

Takes 2 arguments

e1, e2

Return the bitwise OR of the integers e1 and e2.

Noogle detected

Aliases

Detected Type
bitOr :: Int -> Int -> Int

Implementation

This function is implemented in c++ and is part of the native nix runtime.

src/libexpr/primops.cc:4598

static void prim_bitOr(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
    auto i1 = state.forceInt(*args[0], pos, "while evaluating the first argument passed to builtins.bitOr");
    auto i2 = state.forceInt(*args[1], pos, "while evaluating the second argument passed to builtins.bitOr");

    v.mkInt(i1.value | i2.value);
}