summaryrefslogtreecommitdiff
path: root/dhall/src/core/value.rs
diff options
context:
space:
mode:
authorNadrieril2019-05-09 12:48:41 +0200
committerNadrieril2019-05-09 12:48:41 +0200
commit2020d41874f7681ba948a40d8e8f8993d651a81c (patch)
tree48668a407c9049d5b40f0195b5060cca6f5fd67d /dhall/src/core/value.rs
parent325228d54a5b51979e0be112a51988c7449df89c (diff)
Detect duplicate record fields in typecheck
Diffstat (limited to 'dhall/src/core/value.rs')
-rw-r--r--dhall/src/core/value.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs
index 72949be..8fa24c7 100644
--- a/dhall/src/core/value.rs
+++ b/dhall/src/core/value.rs
@@ -1,4 +1,4 @@
-use std::collections::BTreeMap;
+use std::collections::HashMap;
use dhall_proc_macros as dhall;
use dhall_syntax::{
@@ -49,11 +49,11 @@ pub(crate) enum Value {
NEOptionalLit(Thunk),
EmptyListLit(TypeThunk),
NEListLit(Vec<Thunk>),
- RecordLit(BTreeMap<Label, Thunk>),
- RecordType(BTreeMap<Label, TypeThunk>),
- UnionType(BTreeMap<Label, Option<TypeThunk>>),
- UnionConstructor(Label, BTreeMap<Label, Option<TypeThunk>>),
- UnionLit(Label, Thunk, BTreeMap<Label, Option<TypeThunk>>),
+ RecordLit(HashMap<Label, Thunk>),
+ RecordType(HashMap<Label, TypeThunk>),
+ UnionType(HashMap<Label, Option<TypeThunk>>),
+ UnionConstructor(Label, HashMap<Label, Option<TypeThunk>>),
+ UnionLit(Label, Thunk, HashMap<Label, Option<TypeThunk>>),
// Invariant: this must not contain interpolations that are themselves TextLits, and
// contiguous text values must be merged.
TextLit(Vec<InterpolatedTextContents<Thunk>>),