From a5cd3c9aa9b3392116fc63a7e4ea6e03477f0a0c Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Thu, 20 Jun 2024 12:34:24 +0100 Subject: [PATCH] Add lcomposition fixity to support (>>) in the stdlib (#2847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stdlib composition function `∘` has fixity `composition` which means it is right associative. We will rename `∘` to `<<` in the stdlib and add a new function: ``` >> {a b c} : (a -> b) -> (b -> c) -> a -> c ``` for consistency with `<<` this should be left associative. This is not a breaking change to package-base so we don't need to increment the version number. --- include/package-base/Juvix/Builtin/V1/Fixity.juvix | 1 + 1 file changed, 1 insertion(+) diff --git a/include/package-base/Juvix/Builtin/V1/Fixity.juvix b/include/package-base/Juvix/Builtin/V1/Fixity.juvix index 6d03f717af..6a3ed67f87 100644 --- a/include/package-base/Juvix/Builtin/V1/Fixity.juvix +++ b/include/package-base/Juvix/Builtin/V1/Fixity.juvix @@ -21,3 +21,4 @@ syntax fixity additive := binary {assoc := left; above := [comparison; range; co syntax fixity multiplicative := binary {assoc := left; above := [additive]}; syntax fixity composition := binary {assoc := right; above := [multiplicative]}; +syntax fixity lcomposition := binary {assoc := left; above := [multiplicative]};