aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-12-17 14:45:45 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-12-17 14:45:45 +0100
commit12e65078ef5c511196c9e48f7fdf71f6c0e5c89f (patch)
tree1d2f6489422eb51bcb55b338125e2efab7faefed /src/libexpr/primops
parentd67e02919c7f941615407dfd14cfdab6a28c4c26 (diff)
Rename Value::normalType() -> Value::type()
Diffstat (limited to 'src/libexpr/primops')
-rw-r--r--src/libexpr/primops/fetchMercurial.cc2
-rw-r--r--src/libexpr/primops/fetchTree.cc12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc
index 2461ebc99..845a1ed1b 100644
--- a/src/libexpr/primops/fetchMercurial.cc
+++ b/src/libexpr/primops/fetchMercurial.cc
@@ -17,7 +17,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
state.forceValue(*args[0]);
- if (args[0]->normalType() == nAttrs) {
+ if (args[0]->type() == nAttrs) {
state.forceAttrs(*args[0], pos);
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 6d93e1dc2..6e7ddde8e 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -85,25 +85,25 @@ static void fetchTree(
state.forceValue(*args[0]);
- if (args[0]->normalType() == nAttrs) {
+ if (args[0]->type() == nAttrs) {
state.forceAttrs(*args[0], pos);
fetchers::Attrs attrs;
for (auto & attr : *args[0]->attrs) {
state.forceValue(*attr.value);
- if (attr.value->normalType() == nPath || attr.value->normalType() == nString)
+ if (attr.value->type() == nPath || attr.value->type() == nString)
addURI(
state,
attrs,
attr.name,
state.coerceToString(*attr.pos, *attr.value, context, false, false)
);
- else if (attr.value->normalType() == nString)
+ else if (attr.value->type() == nString)
addURI(state, attrs, attr.name, attr.value->string.s);
- else if (attr.value->normalType() == nBool)
+ else if (attr.value->type() == nBool)
attrs.emplace(attr.name, Explicit<bool>{attr.value->boolean});
- else if (attr.value->normalType() == nInt)
+ else if (attr.value->type() == nInt)
attrs.emplace(attr.name, attr.value->integer);
else
throw TypeError("fetchTree argument '%s' is %s while a string, Boolean or integer is expected",
@@ -163,7 +163,7 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
state.forceValue(*args[0]);
- if (args[0]->normalType() == nAttrs) {
+ if (args[0]->type() == nAttrs) {
state.forceAttrs(*args[0], pos);