aboutsummaryrefslogtreecommitdiff
path: root/lux-python/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-python/source/program.lux18
1 files changed, 11 insertions, 7 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index d12ea355c..718cb9d95 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -287,8 +287,8 @@
[7]
[8]))
- (pattern (list& (~~ (static.literals code.local (inputs/? 8)))
- input/+))
+ (pattern (partial_list (~~ (static.literals code.local (inputs/? 8)))
+ input/+))
(again ((as (~~ (static.literal function.identity (function/? 8))) it)
(~~ (static.literals code.local (inputs/? 8))))
input/+))))))))))))
@@ -528,7 +528,7 @@
(IO (Platform Register (_.Expression Any) (_.Statement Any)))
(do io.monad
[host ..host]
- (in [platform.#&file_system (file.async file.default)
+ (in [platform.#file_system (file.async file.default)
platform.#host host
platform.#phase python.generate
platform.#runtime runtime.generate
@@ -555,12 +555,16 @@
(def: (scope body)
(-> (_.Statement Any) (_.Statement Any))
(let [@program (_.var "lux_program")
- max_recursion (|> (_.int +10) (_.** (_.int +6)))
- ; _.statement]
+ ; _.statement
+ $sys (_.__import__/1 (_.unicode "sys"))
+ ... $threading (_.__import__/1 (_.unicode "threading"))
+ current_limit (_.do "getrecursionlimit" (list) $sys)
+ old_limit current_limit
+ new_limit (_.bit_shl (_.int +2) old_limit)]
(<| (_.comment "-*- coding: utf-8 -*-")
($_ _.then
- (; (|> (_.__import__/1 (_.unicode "sys"))
- (_.do "setrecursionlimit" (list max_recursion))))
+ (; (_.do "setrecursionlimit" (list new_limit) $sys))
+ ... (; (_.do "stack_size" (list current_limit) $threading))
(_.def @program (list) body)
(; (_.apply/* (list) @program))
))))