Add ValueType checking functions for types that have the same NormalType

This commit is contained in:
Silvan Mosberger
2020-12-12 03:31:50 +01:00
parent 22ead43a0b
commit bf98903967
8 changed files with 40 additions and 26 deletions
+3 -3
View File
@@ -32,7 +32,7 @@ LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const
void EvalState::forceValue(Value & v, const Pos & pos)
{
if (v.type == tThunk) {
if (v.isThunk()) {
Env * env = v.thunk.env;
Expr * expr = v.thunk.expr;
try {
@@ -46,9 +46,9 @@ void EvalState::forceValue(Value & v, const Pos & pos)
throw;
}
}
else if (v.type == tApp)
else if (v.isApp())
callFunction(*v.app.left, *v.app.right, v, noPos);
else if (v.type == tBlackhole)
else if (v.isBlackhole())
throwEvalError(pos, "infinite recursion encountered");
}