From 55b5be3407a8528bc47482a591b168a7cb0ce91e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 6 May 2019 23:52:15 +0200 Subject: Move main datatypes into their own modules --- dhall/src/phase/normalize.rs | 999 +------------------------------------------ 1 file changed, 15 insertions(+), 984 deletions(-) (limited to 'dhall/src/phase/normalize.rs') diff --git a/dhall/src/phase/normalize.rs b/dhall/src/phase/normalize.rs index 2340bbd..a48c299 100644 --- a/dhall/src/phase/normalize.rs +++ b/dhall/src/phase/normalize.rs @@ -1,988 +1,16 @@ -#![allow(non_snake_case)] use std::collections::BTreeMap; -use std::rc::Rc; -use dhall_proc_macros as dhall; -use dhall_syntax::context::Context; -use dhall_syntax::{ - rc, BinOp, Builtin, Const, ExprF, Integer, InterpolatedTextContents, Label, - Natural, V, X, -}; +use dhall_syntax::{BinOp, Builtin, ExprF, InterpolatedTextContents, Label, X}; -use crate::phase::{NormalizedSubExpr, ResolvedSubExpr, Type, Typed}; +use crate::core::context::NormalizationContext; +use crate::core::thunk::{Thunk, TypeThunk}; +use crate::core::value::Value; +use crate::phase::{NormalizedSubExpr, ResolvedSubExpr, Typed}; -type InputSubExpr = ResolvedSubExpr; -type OutputSubExpr = NormalizedSubExpr; +pub(crate) type InputSubExpr = ResolvedSubExpr; +pub(crate) type OutputSubExpr = NormalizedSubExpr; -/// Stores a pair of variables: a normal one and if relevant one -/// that corresponds to the alpha-normalized version of the first one. -#[derive(Debug, Clone, Eq)] -pub(crate) struct AlphaVar { - normal: V