aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/ffi.php.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/ffi.php.lux')
-rw-r--r--stdlib/source/library/lux/ffi.php.lux100
1 files changed, 50 insertions, 50 deletions
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index 2c71beed1..840fb30de 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -249,56 +249,56 @@
code.local)))
g!type (code.local (maybe.else class alias))
class_import (` ("php constant" (~ (code.text class))))]
- (in (list& (` (type: (~ g!type)
- (..Object (Primitive (~ (code.text class))))))
- (list#each (function (_ member)
- (case member
- {#Field [static? field alias fieldT]}
- (if static?
- (` ((~! syntax:) ((~ (qualify (maybe.else field alias))) [])
- (# (~! meta.monad) (~' in)
- (list (` (.as (~ (nullable_type fieldT))
- ("php constant" (~ (code.text (%.format class "::" field))))))))))
- (` (def: ((~ (qualify field))
- (~ g!object))
- (-> (~ g!type)
- (~ (nullable_type fieldT)))
- (as_expected
- (~ (without_null g!temp fieldT (` ("php object get" (~ (code.text field))
- (as (..Object .Any) (~ g!object))))))))))
-
- {#Method method}
- (case method
- {#Static [method alias inputsT io? try? outputT]}
- (..make_function (qualify (maybe.else method alias))
- g!temp
- (` ("php object get" (~ (code.text method))
- (as (..Object .Any)
- ("php constant" (~ (code.text (%.format class "::" method)))))))
- inputsT
- io?
- try?
- outputT)
-
- {#Virtual [method alias inputsT io? try? outputT]}
- (let [g!inputs (input_variables inputsT)]
- (` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list#each product.right g!inputs))]
- (~ g!object))
- (-> [(~+ (list#each nullable_type inputsT))]
- (~ g!type)
- (~ (|> (nullable_type outputT)
- (try_type try?)
- (io_type io?))))
- (as_expected
- (~ (<| (with_io io?)
- (with_try try?)
- (without_null g!temp outputT)
- (` ("php object do"
- (~ (code.text method))
- (~ g!object)
- (~+ (list#each (with_null g!temp) g!inputs)))))))))))))
- members)))))
+ (in (partial_list (` (type: (~ g!type)
+ (..Object (Primitive (~ (code.text class))))))
+ (list#each (function (_ member)
+ (case member
+ {#Field [static? field alias fieldT]}
+ (if static?
+ (` ((~! syntax:) ((~ (qualify (maybe.else field alias))) [])
+ (# (~! meta.monad) (~' in)
+ (list (` (.as (~ (nullable_type fieldT))
+ ("php constant" (~ (code.text (%.format class "::" field))))))))))
+ (` (def: ((~ (qualify field))
+ (~ g!object))
+ (-> (~ g!type)
+ (~ (nullable_type fieldT)))
+ (as_expected
+ (~ (without_null g!temp fieldT (` ("php object get" (~ (code.text field))
+ (as (..Object .Any) (~ g!object))))))))))
+
+ {#Method method}
+ (case method
+ {#Static [method alias inputsT io? try? outputT]}
+ (..make_function (qualify (maybe.else method alias))
+ g!temp
+ (` ("php object get" (~ (code.text method))
+ (as (..Object .Any)
+ ("php constant" (~ (code.text (%.format class "::" method)))))))
+ inputsT
+ io?
+ try?
+ outputT)
+
+ {#Virtual [method alias inputsT io? try? outputT]}
+ (let [g!inputs (input_variables inputsT)]
+ (` (def: ((~ (qualify (maybe.else method alias)))
+ [(~+ (list#each product.right g!inputs))]
+ (~ g!object))
+ (-> [(~+ (list#each nullable_type inputsT))]
+ (~ g!type)
+ (~ (|> (nullable_type outputT)
+ (try_type try?)
+ (io_type io?))))
+ (as_expected
+ (~ (<| (with_io io?)
+ (with_try try?)
+ (without_null g!temp outputT)
+ (` ("php object do"
+ (~ (code.text method))
+ (~ g!object)
+ (~+ (list#each (with_null g!temp) g!inputs)))))))))))))
+ members)))))
{#Function [name alias inputsT io? try? outputT]}
(let [imported (` ("php constant" (~ (code.text name))))]