mirror of
https://github.com/NixOS/nix
synced 2025-06-26 07:31:15 +02:00
isFunctor: Simplify
This commit is contained in:
parent
8a87521636
commit
51cf4455b2
2 changed files with 6 additions and 11 deletions
|
@ -1291,6 +1291,12 @@ bool EvalState::forceBool(Value & v)
|
|||
}
|
||||
|
||||
|
||||
bool EvalState::isFunctor(Value & fun)
|
||||
{
|
||||
return fun.type == tAttrs && fun.attrs->find(sFunctor) != fun.attrs->end();
|
||||
}
|
||||
|
||||
|
||||
void EvalState::forceFunction(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue