From 4fed459d89b6b3abcce8028b19af806b48a38bd7 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Sun, 22 Mar 2026 13:16:21 +0100 Subject: Add builtin arithmetic operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * also allow choosing evaluator * ensures equivalence of evaluators up-to α-renaming * checks server accepts answers from challenge --- lambda-calcul/haskell/plan.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lambda-calcul/haskell/plan.md') diff --git a/lambda-calcul/haskell/plan.md b/lambda-calcul/haskell/plan.md index 724b719..7c5627e 100644 --- a/lambda-calcul/haskell/plan.md +++ b/lambda-calcul/haskell/plan.md @@ -83,7 +83,7 @@ self-evaluating value — it needs no reduction. This is the smallest possible e ### What it is -Depends on Extension 1. Add `+`, `-`, `*`, `/`, `mod`, `=`, `<` as first-class built-in +Depends on Extension 1. Add `+`, `-`, `*`, `div`, `mod`, `=`, `<` as first-class built-in functions. The key interpreter challenge beyond the trivial "add a case" is *partial application*: `(+ 1)` must be a valid value — a closure waiting for its second argument — rather than an error. @@ -99,7 +99,7 @@ rather than an error. reads back as a neutral application. **`Minilang.Lambda.Parser`** -- Builtin names (`+`, `-`, `*`, `/`, `mod`, `=`, `<`) are already valid identifiers under +- Builtin names (`+`, `-`, `*`, `div`, `mod`, `=`, `<`) are already valid identifiers under the current `extraIdentifierChars` definition, so no parser change is needed beyond registering them as known names. -- cgit v1.3.1