From 092b7208ffd22f8facc7af387ac307e59208d52c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 7 Apr 2020 11:19:36 +0100 Subject: Move duplicate field checking to parser --- dhall/src/operations.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'dhall/src/operations.rs') diff --git a/dhall/src/operations.rs b/dhall/src/operations.rs index 1ebf288..8b5fa10 100644 --- a/dhall/src/operations.rs +++ b/dhall/src/operations.rs @@ -1,7 +1,7 @@ use itertools::Itertools; use std::borrow::Cow; use std::cmp::max; -use std::collections::HashMap; +use std::collections::{BTreeSet, HashMap}; use crate::builtins::Builtin; use crate::error::{ErrorBuilder, TypeError}; @@ -9,7 +9,6 @@ use crate::semantics::{ merge_maps, mk_span_err, mkerr, ret_kind, ret_op, ret_ref, Binder, Closure, Hir, HirKind, Nir, NirKind, Ret, TextLit, Tir, TyEnv, Type, }; -use crate::syntax::map::DupTreeSet; use crate::syntax::{trivial_result, Const, ExprKind, Label, NumKind, Span}; // Definition order must match precedence order for @@ -60,7 +59,7 @@ pub enum OpKind { /// `e.x` Field(SubExpr, Label), /// `e.{ x, y, z }` - Projection(SubExpr, DupTreeSet