query
On this page

isNull

builtins.isNull

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


Nix manual

Takes 1 arguments

e

Return true if e evaluates to null, and false otherwise.

This is equivalent to e == null.

Noogle detected

Detected Type
isNull :: a -> Bool

Implementation

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

src/libexpr/primops.cc:588

static void prim_isNull(EvalState & state, CallSite callSite, Value * const * args, Value & v)
{
    state.forceValue(*args[0], noPos);
    v.mkBool(args[0]->type() == nNull);
}