aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/analysis/procedure/common.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-22 20:37:41 -0400
committerEduardo Julian2017-11-22 20:37:41 -0400
commit0e3830be97930a01c38d8bca09a1ac9d5bf55465 (patch)
tree3078996542de6d53baa43388d0bca96e2b517aa9 /new-luxc/source/luxc/lang/analysis/procedure/common.lux
parente37e3713e080606930a5f8442f03dabc4c26a7f9 (diff)
- Fixed some bugs.
- Some refactoring. - Added some alternative snippets of code that new-luxc can handle better.
Diffstat (limited to 'new-luxc/source/luxc/lang/analysis/procedure/common.lux')
-rw-r--r--new-luxc/source/luxc/lang/analysis/procedure/common.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/procedure/common.lux b/new-luxc/source/luxc/lang/analysis/procedure/common.lux
index 489414c2a..f5afca5bf 100644
--- a/new-luxc/source/luxc/lang/analysis/procedure/common.lux
+++ b/new-luxc/source/luxc/lang/analysis/procedure/common.lux
@@ -172,7 +172,7 @@
(|> (dict;new text;Hash<Text>)
(install "log" (unary Text Unit))
(install "error" (unary Text Bottom))
- (install "exit" (unary Nat Bottom))
+ (install "exit" (unary Int Bottom))
(install "current-time" (nullary Int)))))
(def: bit-procs
@@ -202,7 +202,7 @@
(install "min" (nullary Nat))
(install "max" (nullary Nat))
(install "to-int" (unary Nat Int))
- (install "to-text" (unary Nat Text)))))
+ (install "char" (unary Nat Text)))))
(def: int-procs
Bundle
@@ -277,28 +277,28 @@
(install "lower" (unary Text Text))
)))
-(def: (array-get proc)
+(def: (array//get proc)
(-> Text Proc)
(function [analyse eval args]
(do macro;Monad<Meta>
[[var-id varT] (&;with-type-env tc;var)]
- ((binary Nat (type (Array varT)) varT proc)
+ ((binary (type (Array varT)) Nat (type (Maybe varT)) proc)
analyse eval args))))
-(def: (array-put proc)
+(def: (array//put proc)
(-> Text Proc)
(function [analyse eval args]
(do macro;Monad<Meta>
[[var-id varT] (&;with-type-env tc;var)]
- ((trinary Nat varT (type (Array varT)) (type (Array varT)) proc)
+ ((trinary (type (Array varT)) Nat varT (type (Array varT)) proc)
analyse eval args))))
-(def: (array-remove proc)
+(def: (array//remove proc)
(-> Text Proc)
(function [analyse eval args]
(do macro;Monad<Meta>
[[var-id varT] (&;with-type-env tc;var)]
- ((binary Nat (type (Array varT)) (type (Array varT)) proc)
+ ((binary (type (Array varT)) Nat (type (Array varT)) proc)
analyse eval args))))
(def: array-procs
@@ -306,9 +306,9 @@
(<| (prefix "array")
(|> (dict;new text;Hash<Text>)
(install "new" (unary Nat Array))
- (install "get" array-get)
- (install "put" array-put)
- (install "remove" array-remove)
+ (install "get" array//get)
+ (install "put" array//put)
+ (install "remove" array//remove)
(install "size" (unary (type (Ex [a] (Array a))) Nat))
)))
@@ -359,12 +359,12 @@
((unary (type (Atom varT)) varT proc)
analyse eval args))))
-(def: (atom-compare-and-swap proc)
+(def: (atom//compare-and-swap proc)
(-> Text Proc)
(function [analyse eval args]
(do macro;Monad<Meta>
[[var-id varT] (&;with-type-env tc;var)]
- ((trinary varT varT (type (Atom varT)) Bool proc)
+ ((trinary (type (Atom varT)) varT varT Bool proc)
analyse eval args))))
(def: atom-procs
@@ -373,7 +373,7 @@
(|> (dict;new text;Hash<Text>)
(install "new" atom-new)
(install "read" atom-read)
- (install "compare-and-swap" atom-compare-and-swap)
+ (install "compare-and-swap" atom//compare-and-swap)
)))
(def: process-procs