diff options
author | Nadrieril | 2019-05-09 16:56:17 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-09 16:56:17 +0200 |
commit | bf74436781a1304a937fb31a50c5495223468087 (patch) | |
tree | 06df62ab914c39e3572e9729c9b1088eec549741 /dhall_syntax | |
parent | 32051979778436ea02cb406551f126fe22ea1636 (diff) |
Small utility SubExpr::from_builtin
Diffstat (limited to '')
-rw-r--r-- | dhall_syntax/src/core/expr.rs | 4 |
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, |