summaryrefslogtreecommitdiff
path: root/dhall/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/lib.rs')
-rw-r--r--dhall/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index 4238b6e..f3a11a1 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -99,6 +99,11 @@ impl Parsed {
pub fn to_expr(&self) -> Expr {
self.0.clone()
}
+
+ pub fn substitute_name(self, label: syntax::Label, value: Expr) -> Parsed {
+ let Parsed (expr, import_location) = self;
+ Parsed (expr.substitute_name(label, value), import_location)
+ }
}
impl<'cx> Resolved<'cx> {