diff options
author | Nadrieril | 2019-11-11 11:20:32 +0000 |
---|---|---|
committer | Nadrieril | 2019-11-11 13:50:36 +0000 |
commit | b68c3af578d1f6b0d1e32e7d88ef57774fb468d8 (patch) | |
tree | d35a77d82657928e817fa2541edb6dcbe8455266 /dhall/src/phase/typecheck.rs | |
parent | a8cb6926cbafb2ac806f7bec27a29b0528ed5056 (diff) |
Capture absence of span in Span itself
Diffstat (limited to '')
-rw-r--r-- | dhall/src/phase/typecheck.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index 9013c1f..4d8c7d3 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -2,7 +2,7 @@ use std::cmp::max; use std::collections::HashMap; use dhall_syntax::{ - rc, Builtin, Const, Expr, ExprF, InterpolatedTextContents, Label, + Builtin, Const, Expr, ExprF, InterpolatedTextContents, Label, RawExpr, Span, }; use crate::core::context::TypecheckContext; @@ -142,6 +142,10 @@ pub(crate) fn const_to_value(c: Const) -> Value { } } +pub fn rc<E>(x: RawExpr<E>) -> Expr<E> { + Expr::new(x, Span::Artificial) +} + // Ad-hoc macro to help construct the types of builtins macro_rules! make_type { (Type) => { ExprF::Const(Const::Type) }; |