aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2019-04-04 20:41:40 -0400
committerEduardo Julian2019-04-04 20:41:40 -0400
commit72956a4d2259192148bd3cc95f6fdda0a42e91f1 (patch)
tree2f5adb6999cbb8f32e1e1a12930009df1004612f /stdlib
parent2914f38f7c3795a63f555409361bc1b317e871a9 (diff)
- Updated analysis phase.
- Updated Python compiler.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux44
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux2
3 files changed, 26 insertions, 26 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
index 18ac68d99..9940273cc 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -201,10 +201,10 @@
(///bundle.install "=" (binary Text Text Bit))
(///bundle.install "<" (binary Text Text Bit))
(///bundle.install "concat" (binary Text Text Text))
- (///bundle.install "index" (trinary Text Text Nat (type (Maybe Nat))))
+ (///bundle.install "index" (trinary Nat Text Text (type (Maybe Nat))))
(///bundle.install "size" (unary Text Nat))
- (///bundle.install "char" (binary Text Nat Nat))
- (///bundle.install "clip" (trinary Text Nat Nat Text))
+ (///bundle.install "char" (binary Nat Text Nat))
+ (///bundle.install "clip" (trinary Nat Nat Text Text))
)))
(def: #export (bundle eval)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
index 43ebd105f..7ff70b393 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/extension/common.lux
@@ -29,15 +29,15 @@
Bundle
(<| (bundle.prefix "i64")
(|> bundle.empty
- (bundle.install "and" (binary (product.uncurry (function.flip _.bit-and))))
- (bundle.install "or" (binary (product.uncurry (function.flip _.bit-or))))
- (bundle.install "xor" (binary (product.uncurry (function.flip _.bit-xor))))
+ (bundle.install "and" (binary (product.uncurry _.bit-and)))
+ (bundle.install "or" (binary (product.uncurry _.bit-or)))
+ (bundle.install "xor" (binary (product.uncurry _.bit-xor)))
(bundle.install "left-shift" (binary (function.compose ///runtime.i64//64 (product.uncurry _.bit-shl))))
(bundle.install "logical-right-shift" (binary (product.uncurry ///runtime.i64//logic-right-shift)))
(bundle.install "arithmetic-right-shift" (binary (product.uncurry _.bit-shr)))
- (bundle.install "=" (binary (product.uncurry (function.flip _.=))))
- (bundle.install "+" (binary (product.uncurry (function.flip _.+))))
- (bundle.install "-" (binary (product.uncurry (function.flip _.-))))
+ (bundle.install "=" (binary (product.uncurry _.=)))
+ (bundle.install "+" (binary (product.uncurry _.+)))
+ (bundle.install "-" (binary (product.uncurry _.-)))
)))
(import: #long java/lang/Double
@@ -58,10 +58,10 @@
Bundle
(<| (bundle.prefix "int")
(|> bundle.empty
- (bundle.install "<" (binary (product.uncurry (function.flip _.<))))
- (bundle.install "*" (binary (product.uncurry (function.flip _.*))))
- (bundle.install "/" (binary (product.uncurry (function.flip _./))))
- (bundle.install "%" (binary (product.uncurry (function.flip _.%))))
+ (bundle.install "<" (binary (product.uncurry _.<)))
+ (bundle.install "*" (binary (product.uncurry _.*)))
+ (bundle.install "/" (binary (product.uncurry _./)))
+ (bundle.install "%" (binary (product.uncurry _.%)))
(bundle.install "frac" (unary _.float/1))
(bundle.install "char" (unary _.chr/1)))))
@@ -69,13 +69,13 @@
Bundle
(<| (bundle.prefix "frac")
(|> bundle.empty
- (bundle.install "+" (binary (product.uncurry (function.flip _.+))))
- (bundle.install "-" (binary (product.uncurry (function.flip _.-))))
- (bundle.install "*" (binary (product.uncurry (function.flip _.*))))
- (bundle.install "/" (binary (product.uncurry (function.flip _./))))
- (bundle.install "%" (binary (product.uncurry (function.flip _.%))))
- (bundle.install "=" (binary (product.uncurry (function.flip _.=))))
- (bundle.install "<" (binary (product.uncurry (function.flip _.<))))
+ (bundle.install "+" (binary (product.uncurry _.+)))
+ (bundle.install "-" (binary (product.uncurry _.-)))
+ (bundle.install "*" (binary (product.uncurry _.*)))
+ (bundle.install "/" (binary (product.uncurry _./)))
+ (bundle.install "%" (binary (product.uncurry _.%)))
+ (bundle.install "=" (binary (product.uncurry _.=)))
+ (bundle.install "<" (binary (product.uncurry _.<)))
(bundle.install "smallest" (nullary frac//smallest))
(bundle.install "min" (nullary frac//min))
(bundle.install "max" (nullary frac//max))
@@ -87,11 +87,11 @@
(Binary (Expression Any))
(///runtime.text//char subjectO paramO))
-(def: (text//clip [subjectO paramO extraO])
+(def: (text//clip [paramO extraO subjectO])
(Trinary (Expression Any))
(///runtime.text//clip subjectO paramO extraO))
-(def: (text//index [textO partO startO])
+(def: (text//index [startO partO textO])
(Trinary (Expression Any))
(///runtime.text//index textO partO startO))
@@ -99,9 +99,9 @@
Bundle
(<| (bundle.prefix "text")
(|> bundle.empty
- (bundle.install "=" (binary (product.uncurry (function.flip _.=))))
- (bundle.install "<" (binary (product.uncurry (function.flip _.<))))
- (bundle.install "concat" (binary (product.uncurry (function.flip _.+))))
+ (bundle.install "=" (binary (product.uncurry _.=)))
+ (bundle.install "<" (binary (product.uncurry _.<)))
+ (bundle.install "concat" (binary (product.uncurry _.+)))
(bundle.install "index" (trinary text//index))
(bundle.install "size" (unary _.len/1))
(bundle.install "char" (binary (product.uncurry ///runtime.text//char)))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
index a8f601922..36184e21c 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux
@@ -308,7 +308,7 @@
(runtime: (text//clip @text @from @to)
(_.return (|> @text (_.slice @from (inc @to)))))
-(runtime: (text//char text idx)
+(runtime: (text//char idx text)
(_.if (|> idx (within? (_.len/1 text)))
(_.return (..some (_.ord/1 (|> text (_.slice idx (inc idx))))))
(_.return ..none)))