From 1137f61adeb416d89436a6849a07f28c8f329fc1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 14 Jul 2018 03:23:38 -0400 Subject: Switched to using new bit syntax in new-luxc. --- new-luxc/source/luxc/lang/host/common-lisp.lux | 4 ++-- new-luxc/source/luxc/lang/host/jvm.lux | 4 ++-- new-luxc/source/luxc/lang/host/jvm/inst.lux | 4 ++-- new-luxc/source/luxc/lang/host/php.lux | 8 ++++---- new-luxc/source/luxc/lang/host/python.lux | 4 ++-- new-luxc/source/luxc/lang/host/r.lux | 4 ++-- new-luxc/source/luxc/lang/host/ruby.lux | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'new-luxc/source/luxc/lang/host') diff --git a/new-luxc/source/luxc/lang/host/common-lisp.lux b/new-luxc/source/luxc/lang/host/common-lisp.lux index fb6a933df..2acc52700 100644 --- a/new-luxc/source/luxc/lang/host/common-lisp.lux +++ b/new-luxc/source/luxc/lang/host/common-lisp.lux @@ -54,8 +54,8 @@ (def: #export bool (-> Bit Expression) - (|>> (case> true (:abstraction "t") - false ..nil))) + (|>> (case> #0 ..nil + #1 (:abstraction "t")))) (def: #export int (-> Int Expression) diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux index 3c5fa3150..adb24b8c0 100644 --- a/new-luxc/source/luxc/lang/host/jvm.lux +++ b/new-luxc/source/luxc/lang/host/jvm.lux @@ -93,7 +93,7 @@ (` (def: (~' #export) (~ (code.local-symbol option)) (~ g!type) (|> (~ g!none) - (set@ (~ (code.local-tag option)) true))))) + (set@ (~ (code.local-tag option)) #1))))) options)] (wrap (list& (` (type: (~' #export) (~ g!type) (~ (code.record (list/map (function (_ tag) @@ -103,7 +103,7 @@ (` (def: (~' #export) (~ g!none) (~ g!type) (~ (code.record (list/map (function (_ tag) - [tag (` false)]) + [tag (` #0)]) g!tags+))))) (` (def: (~' #export) ((~ (code.local-symbol ++)) (~ g!_left) (~ g!_right)) diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux index 3f0f68def..393200a28 100644 --- a/new-luxc/source/luxc/lang/host/jvm/inst.lux +++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux @@ -358,7 +358,7 @@ (//type.method (list (#//.Primitive type)) (#.Some (//type.class class (list))) (list)) - false)))) + #0)))) (def: #export (unwrap type) (-> //.Primitive //.Inst) @@ -366,7 +366,7 @@ (|>> (CHECKCAST class) (INVOKEVIRTUAL class (primitive-unwrap type) (//type.method (list) (#.Some (#//.Primitive type)) (list)) - false)))) + #0)))) (def: #export (fuse insts) (-> (List //.Inst) //.Inst) diff --git a/new-luxc/source/luxc/lang/host/php.lux b/new-luxc/source/luxc/lang/host/php.lux index 34c7c0535..6ab97ee52 100644 --- a/new-luxc/source/luxc/lang/host/php.lux +++ b/new-luxc/source/luxc/lang/host/php.lux @@ -61,8 +61,8 @@ (-> Var Argument) (|>> []))] - [parameter false] - [reference true] + [parameter #0] + [reference #1] ) (def: arguments @@ -83,8 +83,8 @@ (def: #export bool (-> Bit Computation) - (|>> (case> true "true" - false "false") + (|>> (case> #0 "false" + #1 "true") :abstraction)) (def: #export int diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux index e39ce5571..43c8b28a3 100644 --- a/new-luxc/source/luxc/lang/host/python.lux +++ b/new-luxc/source/luxc/lang/host/python.lux @@ -49,8 +49,8 @@ (def: #export bool (-> Bit Expression) - (|>> (case> true "True" - false "False") + (|>> (case> #0 "False" + #1 "True") :abstraction)) (def: #export int diff --git a/new-luxc/source/luxc/lang/host/r.lux b/new-luxc/source/luxc/lang/host/r.lux index 4655c1343..8cd802df9 100644 --- a/new-luxc/source/luxc/lang/host/r.lux +++ b/new-luxc/source/luxc/lang/host/r.lux @@ -67,8 +67,8 @@ (def: #export bool (-> Bit Expression) - (|>> (case> true "TRUE" - false "FALSE") + (|>> (case> #0 "FALSE" + #1 "TRUE") self-contained)) (def: #export (int value) diff --git a/new-luxc/source/luxc/lang/host/ruby.lux b/new-luxc/source/luxc/lang/host/ruby.lux index 51b0d7ea7..61e945af0 100644 --- a/new-luxc/source/luxc/lang/host/ruby.lux +++ b/new-luxc/source/luxc/lang/host/ruby.lux @@ -19,8 +19,8 @@ (def: #export bool (-> Bit Expression) - (|>> (case> true "true" - false "false"))) + (|>> (case> #0 "false" + #1 "true"))) (def: #export int (-> Int Expression) -- cgit v1.2.3