aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/eval.cc4
-rw-r--r--src/libexpr/expr-to-xml.cc3
-rw-r--r--src/libexpr/nixexpr-ast.def1
-rw-r--r--src/libexpr/nixexpr.cc2
-rw-r--r--src/libexpr/parser.y4
-rw-r--r--src/libexpr/primops.cc3
6 files changed, 4 insertions, 13 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 2d54f1fc2..4f97c761e 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -254,8 +254,7 @@ string coerceToStringWithContext(EvalState & state,
}
ATerm s;
- if (matchStr(e, s) || matchUri(e, s))
- return aterm2String(s);
+ if (matchStr(e, s)) return aterm2String(s);
if (matchPath(e, s)) {
isPath = true;
@@ -346,7 +345,6 @@ Expr evalExpr2(EvalState & state, Expr e)
/* Normal forms. */
if (sym == symStr ||
sym == symPath ||
- sym == symUri ||
sym == symNull ||
sym == symInt ||
sym == symBool ||
diff --git a/src/libexpr/expr-to-xml.cc b/src/libexpr/expr-to-xml.cc
index 085488bb5..195cbd7b8 100644
--- a/src/libexpr/expr-to-xml.cc
+++ b/src/libexpr/expr-to-xml.cc
@@ -36,9 +36,6 @@ static void printTermAsXML(Expr e, XMLWriter & doc, ATermList & context)
else if (matchPath(e, s))
doc.writeEmptyElement("path", singletonAttrs("value", aterm2String(s)));
- else if (matchUri(e, s))
- doc.writeEmptyElement("uri", singletonAttrs("value", aterm2String(s)));
-
else if (matchNull(e))
doc.writeEmptyElement("null");
diff --git a/src/libexpr/nixexpr-ast.def b/src/libexpr/nixexpr-ast.def
index 4a92eaebf..b797fcfc4 100644
--- a/src/libexpr/nixexpr-ast.def
+++ b/src/libexpr/nixexpr-ast.def
@@ -26,7 +26,6 @@ Var | string | Expr |
Int | int | Expr |
Str | string | Expr |
Path | string | Expr |
-Uri | string | Expr |
List | ATermList | Expr |
BlackHole | | Expr |
Undefined | | Expr |
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index 582eecaf7..a36b45bc1 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -301,7 +301,6 @@ string showType(Expr e)
int i1;
if (matchStr(e, t1)) return "a string";
if (matchPath(e, t1)) return "a path";
- if (matchUri(e, t1)) return "a path";
if (matchNull(e)) return "null";
if (matchInt(e, i1)) return "an integer";
if (matchBool(e, t1)) return "a boolean";
@@ -330,7 +329,6 @@ string showValue(Expr e)
return "\"" + u + "\"";
}
if (matchPath(e, s)) return aterm2String(s);
- if (matchUri(e, s)) return aterm2String(s);
if (matchNull(e)) return "null";
if (matchInt(e, i)) return (format("%1%") % i).str();
if (e == eTrue) return "true";
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index f5c3435e5..d13a1a133 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -3,7 +3,7 @@
%locations
%error-verbose
%defines
-%no-lines
+/* %no-lines */
%parse-param { yyscan_t scanner }
%parse-param { ParseData * data }
%lex-param { yyscan_t scanner }
@@ -200,7 +200,7 @@ expr_simple
else $$ = makeConcatStrings(ATreverse($2));
}
| PATH { $$ = makePath(toATerm(absPath(aterm2String($1), data->basePath))); }
- | URI { $$ = makeUri($1); }
+ | URI { $$ = makeStr($1); }
| '(' expr ')' { $$ = $2; }
/* Let expressions `let {..., body = ...}' are just desugared
into `(rec {..., body = ...}).body'. */
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 761677a70..f35ba737d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -137,7 +137,6 @@ void toString(EvalState & state, Expr e,
scripting convenience, just like `null'. */
if (matchStr(e, s)) result += aterm2String(s);
- else if (matchUri(e, s)) result += aterm2String(s);
else if (e == eTrue) result += "1";
else if (e == eFalse) ;
else if (matchInt(e, n)) result += int2String(n);
@@ -482,7 +481,7 @@ static Expr primDirOf(EvalState & state, const ATermVector & args)
ATerm coerceToString(Expr e)
{
ATerm s;
- if (matchStr(e, s) || matchPath(e, s) || matchUri(e, s))
+ if (matchStr(e, s) || matchPath(e, s))
return s;
return 0;
}