query
On this page

seq

builtins.seq

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


Nix manual

Takes 2 arguments

e1, e2

Evaluate e1, then evaluate and return e2. This ensures that a computation is strict in the value of e1.

Noogle detected

Aliases

Detected Type
seq :: a -> b -> b

Implementation

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

src/libexpr/primops.cc:1239

static void prim_seq(EvalState & state, const PosIdx pos, Value ** args, Value & v)
{
    state.forceValue(*args[0], pos);
    state.forceValue(*args[1], pos);
    v = *args[1];
}