query
On this page

isAttrs

lib.isAttrs

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


Nix manual

Takes 1 arguments

e

Return true if e evaluates to a set, and false otherwise.

Noogle detected

Aliases

Detected Type
isAttrs :: a -> Bool

Implementation

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

src/libexpr/primops.cc:3241

static void prim_isAttrs(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
    state.forceValue(*args[0], pos);
    v.mkBool(args[0]->type() == nAttrs);
}