From c3c1d3d276216796394b553ecbe2832897e3deb0 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 11 Apr 2019 14:21:46 +0200 Subject: Handle untyped case differently from the type of Sort Closes #59 --- dhall/src/expr.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dhall/src/expr.rs') diff --git a/dhall/src/expr.rs b/dhall/src/expr.rs index 5ff097b..aa02c28 100644 --- a/dhall/src/expr.rs +++ b/dhall/src/expr.rs @@ -29,11 +29,11 @@ pub struct Resolved(pub(crate) SubExpr); derive_other_traits!(Resolved); #[derive(Debug, Clone, Eq)] -pub struct Typed(pub(crate) SubExpr, pub(crate) Type); +pub struct Typed(pub(crate) SubExpr, pub(crate) Option); derive_other_traits!(Typed); #[derive(Debug, Clone, Eq)] -pub struct Normalized(pub(crate) SubExpr, pub(crate) Type); +pub struct Normalized(pub(crate) SubExpr, pub(crate) Option); derive_other_traits!(Normalized); /// An expression of type `Type` (like `Bool` or `Natural -> Text`, but not `Type`) @@ -47,7 +47,8 @@ pub struct Type(pub(crate) TypeInternal); #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) enum TypeInternal { Expr(Box), - Untyped, + // The type of `Sort` + SuperType, } // Exposed for the macros -- cgit v1.2.3