fix •-things being considered pure
This commit is contained in:
parent
e9aff609bf
commit
39d095c8dc
@ -2,6 +2,7 @@
|
||||
#include "../utils/mut.h"
|
||||
#include "../utils/utf.h"
|
||||
#include "../utils/talloc.h"
|
||||
#include "../utils/builtins.h"
|
||||
|
||||
|
||||
NORETURN NOINLINE void err(char* s) {
|
||||
@ -425,6 +426,7 @@ char* format_type(u8 u) {
|
||||
bool isPureFn(B x) { // doesn't consume
|
||||
if (isCallable(x)) {
|
||||
if (v(x)->flags) return true;
|
||||
if (v(x)->extra >= pf_type) return false;
|
||||
B2B dcf = TI(x,decompose);
|
||||
B xd = dcf(inc(x));
|
||||
B* xdp = harr_ptr(xd);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
/* fns.c*/A(ud,"↕") A(fne,"≢") A(feq,"≡") A(ltack,"⊣") A(rtack,"⊢") M(fmtF,"•FmtF") A(indexOf,"⊐") A(memberOf,"∊") A(find,"⍷") A(count,"⊒") \
|
||||
/* sfns.c*/A(shape,"⥊") A(pick,"⊑") A(pair,"{𝕨‿𝕩}") A(select,"⊏") A(slash,"/") A(join,"∾") A(couple,"≍") A(shiftb,"»") A(shifta,"«") A(take,"↑") A(drop,"↓") A(group,"⊔") A(reverse,"⌽") \
|
||||
/* sort.c*/A(gradeUp,"⍋") A(gradeDown,"⍒") \
|
||||
/* everything before the definition of •Type is defined to be pure, and everything after is not */ \
|
||||
/* sysfn.c*/M(type,"•Type") M(decp,"•Decompose") M(primInd,"•PrimInd") M(glyph,"•Glyph") A(fill,"•FillFn") M(sys,"•getsys") A(grLen,"•GroupLen") D(grOrd,"•groupOrd") \
|
||||
/* sysfn.c*/M(repr,"•Repr") A(asrt,"!") A(casrt,"!") M(out,"•Out") M(show,"•Show") M(bqn,"•BQN") \
|
||||
/* sysfn.c*/D(cmp,"•Cmp") A(hash,"•Hash") M(delay,"•Delay") M(makeRand,"•MakeRand") M(exit,"•Exit") M(getLine,"•GetLine") \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user