summaryrefslogtreecommitdiff
path: root/dhall/src/syntax
diff options
context:
space:
mode:
authorNadrieril2020-02-16 19:06:23 +0000
committerNadrieril2020-02-16 19:49:44 +0000
commit130de8cea49c848a06174c61c747d9414a5c71b7 (patch)
tree201ee2cdb8725e1bdc8e8fcdf3c7c6bcce2063f4 /dhall/src/syntax
parentaa867b21f57f9bef2ec2b9d8450736f9111189ee (diff)
Start requiring Universe to build a Type
Diffstat (limited to '')
-rw-r--r--dhall/src/syntax/ast/expr.rs7
1 files changed, 7 insertions, 0 deletions
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`\").