summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-05-08 17:29:23 +0200
committerNadrieril2019-05-08 17:29:23 +0200
commit7aafedae36fe81a64720592f75723b6646913fe2 (patch)
tree4f2c76ffa6930183023cbe7a4946c589403c3191
parent1ea478858573045e5d3e3f8ccc3773021ea68ffa (diff)
Rename the record combining operators internally
Diffstat (limited to '')
-rw-r--r--dhall/src/phase/binary.rs6
-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
4 files changed, 14 insertions, 14 deletions
diff --git a/dhall/src/phase/binary.rs b/dhall/src/phase/binary.rs
index 30aa7a0..249d7c7 100644
--- a/dhall/src/phase/binary.rs
+++ b/dhall/src/phase/binary.rs
@@ -85,9 +85,9 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<ParsedExpr, DecodeError> {
5 => NaturalTimes,
6 => TextAppend,
7 => ListAppend,
- 8 => Combine,
- 9 => Prefer,
- 10 => CombineTypes,
+ 8 => RecursiveRecordMerge,
+ 9 => RightBiasedRecordMerge,
+ 10 => RecursiveRecordTypeMerge,
11 => ImportAlt,
_ => {
Err(DecodeError::WrongFormatError("binop".to_owned()))?
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 => "#",
})
}