From 51c4f79fe092191d670ffa2f9098693079dbc1be Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 7 Aug 2019 21:18:11 +0200 Subject: Add truncated Natural subtraction --- dhall_syntax/src/core/expr.rs | 1 + dhall_syntax/src/parser.rs | 1 + dhall_syntax/src/printer.rs | 1 + 3 files changed, 3 insertions(+) (limited to 'dhall_syntax') diff --git a/dhall_syntax/src/core/expr.rs b/dhall_syntax/src/core/expr.rs index aab4b6a..b293357 100644 --- a/dhall_syntax/src/core/expr.rs +++ b/dhall_syntax/src/core/expr.rs @@ -119,6 +119,7 @@ pub enum Builtin { NaturalOdd, NaturalToInteger, NaturalShow, + NaturalSubtract, IntegerToDouble, IntegerShow, DoubleShow, diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index a7f419a..72dfcdd 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -80,6 +80,7 @@ impl crate::Builtin { "Natural/odd" => Some(NaturalOdd), "Natural/toInteger" => Some(NaturalToInteger), "Natural/show" => Some(NaturalShow), + "Natural/subtract" => Some(NaturalSubtract), "Integer/toDouble" => Some(IntegerToDouble), "Integer/show" => Some(IntegerShow), "Double/show" => Some(DoubleShow), diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs index db688bd..1d6c113 100644 --- a/dhall_syntax/src/printer.rs +++ b/dhall_syntax/src/printer.rs @@ -449,6 +449,7 @@ impl Display for Builtin { NaturalOdd => "Natural/odd", NaturalToInteger => "Natural/toInteger", NaturalShow => "Natural/show", + NaturalSubtract => "Natural/subtract", IntegerToDouble => "Integer/toDouble", IntegerShow => "Integer/show", DoubleShow => "Double/show", -- cgit v1.2.3