From 130de8cea49c848a06174c61c747d9414a5c71b7 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 16 Feb 2020 19:06:23 +0000 Subject: Start requiring Universe to build a Type --- dhall/src/syntax/ast/expr.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dhall/src/syntax') diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index 18ec9fd..a479b53 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -1,3 +1,4 @@ +use crate::semantics::Universe; use crate::syntax::map::{DupTreeMap, DupTreeSet}; use crate::syntax::visitor; use crate::syntax::*; @@ -18,6 +19,12 @@ pub enum Const { Sort, } +impl Const { + pub(crate) fn to_universe(self) -> Universe { + Universe::from_const(self) + } +} + /// Bound variable /// /// The `Label` field is the variable's name (i.e. \"`x`\"). -- cgit v1.2.3