From 7aafedae36fe81a64720592f75723b6646913fe2 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 8 May 2019 17:29:23 +0200 Subject: Rename the record combining operators internally --- dhall_syntax/src/core/expr.rs | 10 +++++----- dhall_syntax/src/parser.rs | 6 +++--- dhall_syntax/src/printer.rs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'dhall_syntax/src') 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 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 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 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 => "#", }) } -- cgit v1.2.3