summaryrefslogtreecommitdiff
path: root/dhall_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_syntax/src')
-rw-r--r--dhall_syntax/src/core/expr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/dhall_syntax/src/core/expr.rs b/dhall_syntax/src/core/expr.rs
index 3b73d88..c509bae 100644
--- a/dhall_syntax/src/core/expr.rs
+++ b/dhall_syntax/src/core/expr.rs
@@ -338,6 +338,10 @@ impl<N, E> SubExpr<N, E> {
SubExpr(Rc::new((x, None)))
}
+ pub fn from_builtin(b: Builtin) -> Self {
+ SubExpr::from_expr_no_note(ExprF::Builtin(b))
+ }
+
pub fn rewrap<E2>(&self, x: Expr<N, E2>) -> SubExpr<N, E2>
where
N: Clone,