factor/core/combinators
Doug Coleman 05b48364c6 factor: Working on making locals-everywhere, array literals constructed
by ``output>array``, and fry with arrays.

We need to expand macros before doing the locals transform ``rewrite-closures`` and fry needs to happen in the locals pass because the locals pass touches the retainstack as part of the transform and we only want to do this once. We defer fry by making a <fryable> which rewrite-closures transforms.

Fixes things like the following that used to break because the locals
transform happened before fry.

::: bar ( a b -- a ) '[ |[ a | a _ + ] call ] call ;

Also we can use fry in case/cond now since macro-expansion happens
first.

Things like this work:
::: foo ( a b c -- a ) :> ( a b c ) c q{{ a b c a b + c _ }} ;
1 2 4 foo ...
{ 1 2 4 3 4 4 }

Triple colon will become colon soon.

Finally, there is a potential issue with macros changing the order of
fry underscore expansion since fry happens later. We need to rewrite fry
internally as 0_ 1_ 2_ so order is preserved everywhere in the expanded
macro.
2020-03-12 17:06:15 -05:00
..
short-circuit factor: change some spacing with ; on its own line 2018-03-19 00:03:27 -05:00
smart factor: Working on making locals-everywhere, array literals constructed 2020-03-12 17:06:15 -05:00
authors.txt Move call( and execute( to core 2009-03-16 20:11:36 -05:00
combinators-docs.factor core: Remove some foo'bar words and a lot of postpone: 2018-08-09 21:59:15 -04:00
combinators-tests.factor modern: more syntax fixes 2019-10-20 17:59:49 -05:00
combinators.factor combinators: faster hashcode for byte-arrays. 2019-04-05 16:55:10 -07:00
summary.txt