aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/target/python.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-01-12 23:09:05 -0400
committerEduardo Julian2021-01-12 23:09:05 -0400
commit71de092a045dc70ab1c9eead477cf1512b144a87 (patch)
tree1f71aca655d867b748c430996d3687911b7537cc /stdlib/source/lux/target/python.lux
parent5dbf134346424602b0104d1f749c1a9eac6f21af (diff)
Raise error when trying to use deprecated fields/method/classes in JVM.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/target/python.lux14
1 files changed, 14 insertions, 0 deletions
diff --git a/stdlib/source/lux/target/python.lux b/stdlib/source/lux/target/python.lux
index 3f0211e33..6edba8f89 100644
--- a/stdlib/source/lux/target/python.lux
+++ b/stdlib/source/lux/target/python.lux
@@ -1,6 +1,8 @@
(.module:
[lux (#- Location Code not or and list if cond int comment)
[abstract
+ [equivalence (#+ Equivalence)]
+ [hash (#+ Hash)]
["." enum]]
[control
[pipe (#+ new> case> cond>)]
@@ -34,6 +36,18 @@
(abstract: #export (Code brand)
Text
+ (structure: #export equivalence
+ (All [brand] (Equivalence (Code brand)))
+
+ (def: (= reference subject)
+ (\ text.equivalence = (:representation reference) (:representation subject))))
+
+ (structure: #export hash
+ (All [brand] (Hash (Code brand)))
+
+ (def: &equivalence ..equivalence)
+ (def: hash (|>> :representation (\ text.hash hash))))
+
(def: #export manual
(-> Text Code)
(|>> :abstraction))