From 22626f7de1460a65ef510d9d2733ec28fa42d26f Mon Sep 17 00:00:00 2001 From: dours Date: Tue, 4 Oct 2022 19:47:12 +0300 Subject: [PATCH] the second argument for the xmyArray cons must be added everywhere --- transpiler/src/main/eo/preface/pystring.eo | 2 +- transpiler/src/main/eo/preface/xfilter.eo | 3 ++- transpiler/src/main/eo/preface/xmap.eo | 3 ++- transpiler/src/main/eo/preface/xmyArray.eo | 4 ++-- transpiler/src/main/eo/preface/xmyMap.eo | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/transpiler/src/main/eo/preface/pystring.eo b/transpiler/src/main/eo/preface/pystring.eo index 935218b9c..a82959d15 100644 --- a/transpiler/src/main/eo/preface/pystring.eo +++ b/transpiler/src/main/eo/preface/pystring.eo @@ -64,7 +64,7 @@ 123 [] > to-my-array - (goto ((xmyArray.ap (*)).@)).result > a + (goto ((xmyArray.ap (pybool TRUE) (*)).@)).result > a memory 0 > index seq > @ (index.lt (value.length)).while diff --git a/transpiler/src/main/eo/preface/xfilter.eo b/transpiler/src/main/eo/preface/xfilter.eo index 2175f98fa..31271fad2 100644 --- a/transpiler/src/main/eo/preface/xfilter.eo +++ b/transpiler/src/main/eo/preface/xfilter.eo @@ -1,11 +1,12 @@ +package preface +alias return preface.return +alias xmyArray preface.xmyArray ++alias pybool preface.pybool [] > xfilter [f l] > ap [stackUp] > @ - (goto ((xmyArray.ap (*)).@)).result > ans + (goto ((xmyArray.ap (pybool TRUE) (*)).@)).result > ans memory 0 > i seq > @ (i.lt (l.value.length)).while diff --git a/transpiler/src/main/eo/preface/xmap.eo b/transpiler/src/main/eo/preface/xmap.eo index b57bfb78f..b25133e55 100644 --- a/transpiler/src/main/eo/preface/xmap.eo +++ b/transpiler/src/main/eo/preface/xmap.eo @@ -1,11 +1,12 @@ +package preface +alias return preface.return +alias xmyArray preface.xmyArray ++alias pybool preface.pybool [] > xmap [f l] > ap [stackUp] > @ - (goto ((xmyArray.ap (*)).@)).result > ans + (goto ((xmyArray.ap (pybool TRUE) (*)).@)).result > ans memory 0 > i seq > @ (i.lt (l.value.length)).while diff --git a/transpiler/src/main/eo/preface/xmyArray.eo b/transpiler/src/main/eo/preface/xmyArray.eo index 1ea6299ed..3fdbfaf56 100644 --- a/transpiler/src/main/eo/preface/xmyArray.eo +++ b/transpiler/src/main/eo/preface/xmyArray.eo @@ -21,7 +21,7 @@ [] > to-my-array pResult > @ [x] > with-value - (goto ((xmyArray.ap x).@)).result > @ + (goto ((xmyArray.ap is-list x).@)).result > @ [] > xlength [self] > ap [stackUp] > @ @@ -52,7 +52,7 @@ [self what] > ap [stackUp] > @ memory FALSE > removed - (goto ((xmyArray.ap (*)).@)).result > accum + (goto ((xmyArray.ap is-list (*)).@)).result > accum memory 0 > i seq > @ (i.lt (self.value.length)).while diff --git a/transpiler/src/main/eo/preface/xmyMap.eo b/transpiler/src/main/eo/preface/xmyMap.eo index 68c86fc1d..08a8baf82 100644 --- a/transpiler/src/main/eo/preface/xmyMap.eo +++ b/transpiler/src/main/eo/preface/xmyMap.eo @@ -127,7 +127,7 @@ [] > xkeys [self] > ap [stackUp] > @ - (goto ((xmyArray.ap (*)).@)).result > accum + (goto ((xmyArray.ap (pybool TRUE) (*)).@)).result > accum memory 0 > i seq > @ (i.lt (value.length)).while @@ -143,7 +143,7 @@ [] > xkeys-internal [] > ap [stackUp] > @ - (goto ((xmyArray.ap (*)).@)).result > accum + (goto ((xmyArray.ap (pybool TRUE) (*)).@)).result > accum memory 0 > i seq > @ (i.lt (value.length)).while