diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 3d080dec3..129b9e2e5 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -927,6 +927,17 @@ static Expr prim_stringLength(EvalState & state, const ATermVector & args) } +/************************************************************* + * Strictness + *************************************************************/ + + +static Expr prim_strict(EvalState & state, const ATermVector & args) +{ + return evalExpr(state, makeCall(args[0], evalExpr(state, args[1]))); +} + + /************************************************************* * Primop registration *************************************************************/ @@ -993,6 +1004,9 @@ void EvalState::addPrimOps() addPrimOp("toString", 1, prim_toString); addPrimOp("__substring", 3, prim_substring); addPrimOp("__stringLength", 1, prim_stringLength); + + // Strictness + addPrimOp("strict", 2, prim_strict); }