query
On this page

deepSeq

lib.deepSeq

Primop
Docs pulled from | This Revision | 18 days ago


Nix manual

Takes 2 arguments

e1, e2

This is like seq e1 e2, except that e1 is evaluated deeply: if it’s a list or set, its elements or attributes are also evaluated recursively.

Noogle detected

Aliases

Detected Type
deepSeq :: a -> b -> b

Implementation

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

src/libexpr/primops.cc:1298

static void prim_deepSeq(EvalState & state, CallSite callSite, Value * const * args, Value & v)
{
    state.forceValueDeep(*args[0]);
    state.forceValue(*args[1], noPos);
    v = *args[1];
}

Implementation

The following is the current implementation of this function.

deepSeq