• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revisioneb366be1cff71357faf917420f41f6d3cd24bb16 (tree)
Time2018-07-20 07:37:35
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Futzing with types.

Change Summary

Incremental Difference

diff -r 747e86657f67 -r eb366be1cff7 joy/library.py
--- a/joy/library.py Thu Jul 19 15:18:42 2018 -0700
+++ b/joy/library.py Thu Jul 19 15:37:35 2018 -0700
@@ -1520,13 +1520,19 @@
15201520
15211521
15221522 EXPECTATIONS = dict(
1523+ ifte=(s7, (s6, (s5, s4))),
15231524 nullary=(s7, s6),
1525+ run=(s7, s6),
1526+
15241527 )
15251528
15261529
15271530 for name in '''
15281531 dinfrirst
15291532 nullary
1533+ ifte
1534+ run
1535+ dupdipd codireco
15301536 '''.split():
15311537 C = _dictionary[name]
15321538 expect = EXPECTATIONS.get(name)
@@ -1539,10 +1545,10 @@
15391545
15401546
15411547 for name in ('''
1542-of quoted enstacken ?
1543-unary binary ternary
1544-sqr codireco unquoted
1545-'''.split()):
1548+ of quoted enstacken ?
1549+ unary binary ternary
1550+ sqr unquoted
1551+ '''.split()):
15461552 of_ = _dictionary[name]
15471553 secs = infer_expression(of_.body)
15481554 assert len(secs) == 1, repr(secs)
@@ -1558,13 +1564,8 @@
15581564
15591565 ## product == 1 swap [*] step
15601566 ## flatten == [] swap [concat] step
1561-## quoted == [unit] dip
1562-## unquoted == [i] dip
1563-## enstacken == stack [clear] dip
1564-## ? == dup truthy
15651567 ## disenstacken == ? [uncons ?] loop pop
15661568 ## pam == [i] map
1567-## run == [] swap infra
15681569 ## size == 0 swap [pop ++] step
15691570 ## fork == [i] app2
15701571 ## cleave == fork [popd] dip
Show on old repository browser