summaryrefslogtreecommitdiff
path: root/dhall_syntax/src
diff options
context:
space:
mode:
authorNadrieril2019-05-08 17:29:23 +0200
committerNadrieril2019-05-08 17:29:23 +0200
commit7aafedae36fe81a64720592f75723b6646913fe2 (patch)
tree4f2c76ffa6930183023cbe7a4946c589403c3191 /dhall_syntax/src
parent1ea478858573045e5d3e3f8ccc3773021ea68ffa (diff)
Rename the record combining operators internally
Diffstat (limited to '')
-rw-r--r--dhall_syntax/src/core/expr.rs10
-rw-r--r--dhall_syntax/src/parser.rs6
-rw-r--r--dhall_syntax/src/printer.rs6
3 files changed, 11 insertions, 11 deletions
diff --git a/dhall_syntax/src/core/expr.rs b/dhall_syntax/src/core/expr.rs
index 113512b..3bc7504 100644
--- a/dhall_syntax/src/core/expr.rs
+++ b/dhall_syntax/src/core/expr.rs
@@ -89,11 +89,11 @@ pub enum BinOp {
/// x && y`
BoolAnd,
/// x ∧ y`
- Combine,
- /// x // y
- Prefer,
- /// x //\\ y
- CombineTypes,
+ RecursiveRecordMerge,
+ /// x ⫽ y
+ RightBiasedRecordMerge,
+ /// x ⩓ y
+ RecursiveRecordTypeMerge,
/// x * y`
NaturalTimes,
/// x == y`
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs
index 83ccc1e..51dbfd2 100644
--- a/dhall_syntax/src/parser.rs
+++ b/dhall_syntax/src/parser.rs
@@ -762,21 +762,21 @@ make_parser! {
rule!(combine_expression<ParsedSubExpr> as expression; children!(
[expression(e)] => e,
[expression(first), expression(rest)..] => {
- let o = crate::BinOp::Combine;
+ let o = crate::BinOp::RecursiveRecordMerge;
rest.fold(first, |acc, e| unspanned(BinOp(o, acc, e)))
},
));
rule!(prefer_expression<ParsedSubExpr> as expression; children!(
[expression(e)] => e,
[expression(first), expression(rest)..] => {
- let o = crate::BinOp::Prefer;
+ let o = crate::BinOp::RightBiasedRecordMerge;
rest.fold(first, |acc, e| unspanned(BinOp(o, acc, e)))
},
));
rule!(combine_types_expression<ParsedSubExpr> as expression; children!(
[expression(e)] => e,
[expression(first), expression(rest)..] => {
- let o = crate::BinOp::CombineTypes;
+ let o = crate::BinOp::RecursiveRecordTypeMerge;
rest.fold(first, |acc, e| unspanned(BinOp(o, acc, e)))
},
));
diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs
index ebc9770..9f03701 100644
--- a/dhall_syntax/src/printer.rs
+++ b/dhall_syntax/src/printer.rs
@@ -297,13 +297,13 @@ impl Display for BinOp {
TextAppend => "++",
NaturalPlus => "+",
BoolAnd => "&&",
- Combine => "/\\",
+ RecursiveRecordMerge => "∧",
NaturalTimes => "*",
BoolEQ => "==",
BoolNE => "!=",
- CombineTypes => "//\\\\",
+ RecursiveRecordTypeMerge => "⩓",
ImportAlt => "?",
- Prefer => "//",
+ RightBiasedRecordMerge => "⫽",
ListAppend => "#",
})
}