summaryrefslogtreecommitdiff
path: root/dhall_core/src
diff options
context:
space:
mode:
authorNadrieril2019-03-21 15:42:16 +0100
committerNadrieril2019-03-21 15:42:16 +0100
commit427c5e55a6e6768b22c3e7ad40594d451ac024e7 (patch)
treeed5b8ae5af363536bbbf8054a0eeb6c014e3e2fa /dhall_core/src
parent7bbf42dc5d3727dffcb036ffe30dd433faff1950 (diff)
Rename Record/Union to RecordType/UnionType
Diffstat (limited to 'dhall_core/src')
-rw-r--r--dhall_core/src/core.rs8
-rw-r--r--dhall_core/src/parser.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/dhall_core/src/core.rs b/dhall_core/src/core.rs
index 68e781d..1d733aa 100644
--- a/dhall_core/src/core.rs
+++ b/dhall_core/src/core.rs
@@ -199,11 +199,11 @@ pub enum Expr<Note, Embed> {
/// `OptionalLit t [] ~ [] : Optional t`
OptionalLit(Option<SubExpr<Note, Embed>>, Option<SubExpr<Note, Embed>>),
/// `Record [(k1, t1), (k2, t2)] ~ { k1 : t1, k2 : t1 }`
- Record(BTreeMap<Label, SubExpr<Note, Embed>>),
+ RecordType(BTreeMap<Label, SubExpr<Note, Embed>>),
/// `RecordLit [(k1, v1), (k2, v2)] ~ { k1 = v1, k2 = v2 }`
RecordLit(BTreeMap<Label, SubExpr<Note, Embed>>),
/// `Union [(k1, t1), (k2, t2)] ~ < k1 : t1, k2 : t2 >`
- Union(BTreeMap<Label, SubExpr<Note, Embed>>),
+ UnionType(BTreeMap<Label, SubExpr<Note, Embed>>),
/// `UnionLit (k1, v1) [(k2, t2), (k3, t3)] ~ < k1 = t1, k2 : t2, k3 : t3 >`
UnionLit(
Label,
@@ -347,9 +347,9 @@ where
EmptyListLit(t) => EmptyListLit(map(t)),
NEListLit(es) => NEListLit(vec(es)),
OptionalLit(t, es) => OptionalLit(opt(t), opt(es)),
- Record(kts) => Record(btmap(kts)),
+ RecordType(kts) => RecordType(btmap(kts)),
RecordLit(kvs) => RecordLit(btmap(kvs)),
- Union(kts) => Union(btmap(kts)),
+ UnionType(kts) => UnionType(btmap(kts)),
UnionLit(k, v, kvs) => UnionLit(map_label(k), map(v), btmap(kvs)),
Merge(x, y, t) => Merge(map(x), map(y), opt(t)),
Field(r, x) => Field(map(r), map_label(x)),
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs
index 896a93f..3310bb9 100644
--- a/dhall_core/src/parser.rs
+++ b/dhall_core/src/parser.rs
@@ -631,14 +631,14 @@ make_parser! {
);
rule!(empty_record_type<ParsedExpr> as expression;
- raw_pair!(_) => bx(Expr::Record(BTreeMap::new()))
+ raw_pair!(_) => bx(Expr::RecordType(BTreeMap::new()))
);
rule!(non_empty_record_type_or_literal<ParsedExpr> as expression; children!(
[label_raw(first_label), non_empty_record_type(rest)] => {
let (first_expr, mut map) = rest;
map.insert(first_label, first_expr);
- bx(Expr::Record(map))
+ bx(Expr::RecordType(map))
},
[label_raw(first_label), non_empty_record_literal(rest)] => {
let (first_expr, mut map) = rest;
@@ -669,13 +669,13 @@ make_parser! {
rule!(union_type_or_literal<ParsedExpr> as expression; children!(
[empty_union_type(_)] => {
- bx(Expr::Union(BTreeMap::new()))
+ bx(Expr::UnionType(BTreeMap::new()))
},
[non_empty_union_type_or_literal((Some((l, e)), entries))] => {
bx(Expr::UnionLit(l, e, entries))
},
[non_empty_union_type_or_literal((None, entries))] => {
- bx(Expr::Union(entries))
+ bx(Expr::UnionType(entries))
},
));