query
On this page

isInt

lib.strings.isInt

Primop
Docs pulled from | This Revision | 18 minutes ago


Nix manual

Takes 1 arguments

e

Return true if e evaluates to an integer, and false otherwise.

Noogle detected

Aliases

Detected Type
isInt :: a -> Bool

Implementation

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

src/libexpr/primops.cc:627

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