diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/target/jvm/constant.lux | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/stdlib/source/lux/target/jvm/constant.lux b/stdlib/source/lux/target/jvm/constant.lux index e8f369492..6b953e008 100644 --- a/stdlib/source/lux/target/jvm/constant.lux +++ b/stdlib/source/lux/target/jvm/constant.lux @@ -34,7 +34,7 @@ (type: #export UTF8 Text) -(def: utf8-writer +(def: utf8_writer (Writer UTF8) binaryF.utf8/16) @@ -49,13 +49,13 @@ (-> (Index UTF8) Class) (|>> :abstraction)) - (def: #export class-equivalence + (def: #export class_equivalence (Equivalence Class) (\ equivalence.functor map ..index //index.equivalence)) - (def: class-writer + (def: class_writer (Writer Class) (|>> :representation //index.writer)) ) @@ -64,7 +64,7 @@ ["#::." (#static floatToRawIntBits #manual [float] int)]) -(structure: #export float-equivalence +(structure: #export float_equivalence (Equivalence java/lang/Float) (def: (= parameter subject) @@ -87,7 +87,7 @@ (All [kind] (-> (Value kind) kind)) (|>> :representation)) - (def: #export (value-equivalence Equivalence<kind>) + (def: #export (value_equivalence Equivalence<kind>) (All [kind] (-> (Equivalence kind) (Equivalence (Value kind)))) @@ -109,28 +109,28 @@ [string String (Index UTF8)] ) - (template [<writer-name> <type> <write> <writer>] - [(def: <writer-name> + (template [<writer_name> <type> <write> <writer>] + [(def: <writer_name> (Writer <type>) (`` (|>> :representation (~~ (template.splice <write>)) (~~ (template.splice <writer>)))))] - [integer-writer Integer [] [binaryF.bits/32]] - [float-writer Float [java/lang/Float::floatToRawIntBits host.int-to-long (:coerce I64)] [i32.i32 binaryF.bits/32]] - [long-writer Long [] [binaryF.bits/64]] - [double-writer Double [java/lang/Double::doubleToRawLongBits] [binaryF.bits/64]] - [string-writer String [] [//index.writer]] + [integer_writer Integer [] [binaryF.bits/32]] + [float_writer Float [java/lang/Float::floatToRawIntBits host.int_to_long (:coerce I64)] [i32.i32 binaryF.bits/32]] + [long_writer Long [] [binaryF.bits/64]] + [double_writer Double [java/lang/Double::doubleToRawLongBits] [binaryF.bits/64]] + [string_writer String [] [//index.writer]] ) ) -(type: #export (Name-And-Type of) +(type: #export (Name_And_Type of) {#name (Index UTF8) #descriptor (Index (Descriptor of))}) (type: #export (Reference of) {#class (Index Class) - #name-and-type (Index (Name-And-Type of))}) + #name_and_type (Index (Name_And_Type of))}) (template [<type> <equivalence> <writer>] [(def: #export <equivalence> @@ -145,8 +145,8 @@ //index.writer //index.writer))] - [Name-And-Type name-and-type-equivalence name-and-type-writer] - [Reference reference-equivalence reference-writer] + [Name_And_Type name_and_type_equivalence name_and_type_writer] + [Reference reference_equivalence reference_writer] ) (type: #export Constant @@ -159,8 +159,8 @@ (#String String) (#Field (Reference //category.Value)) (#Method (Reference //category.Method)) - (#Interface-Method (Reference //category.Method)) - (#Name-And-Type (Name-And-Type Any))) + (#Interface_Method (Reference //category.Method)) + (#Name_And_Type (Name_And_Type Any))) (def: #export (size constant) (-> Constant Nat) @@ -182,16 +182,16 @@ [[(<tag> reference) (<tag> sample)] (\ <equivalence> = reference sample)]) ([#UTF8 text.equivalence] - [#Integer (..value-equivalence i32.equivalence)] - [#Long (..value-equivalence int.equivalence)] - [#Float (..value-equivalence float-equivalence)] - [#Double (..value-equivalence frac.equivalence)] - [#Class ..class-equivalence] - [#String (..value-equivalence //index.equivalence)] - [#Field ..reference-equivalence] - [#Method ..reference-equivalence] - [#Interface-Method ..reference-equivalence] - [#Name-And-Type ..name-and-type-equivalence]) + [#Integer (..value_equivalence i32.equivalence)] + [#Long (..value_equivalence int.equivalence)] + [#Float (..value_equivalence float_equivalence)] + [#Double (..value_equivalence frac.equivalence)] + [#Class ..class_equivalence] + [#String (..value_equivalence //index.equivalence)] + [#Field ..reference_equivalence] + [#Method ..reference_equivalence] + [#Interface_Method ..reference_equivalence] + [#Name_And_Type ..name_and_type_equivalence]) _ false))) @@ -199,40 +199,40 @@ ## ## #UTF8 ## text.equivalence ## ## #Long - ## (..value-equivalence int.equivalence) + ## (..value_equivalence int.equivalence) ## ## #Double - ## (..value-equivalence frac.equivalence) + ## (..value_equivalence frac.equivalence) ## ## #Class - ## ..class-equivalence + ## ..class_equivalence ## ## #String - ## (..value-equivalence //index.equivalence) + ## (..value_equivalence //index.equivalence) ## ## #Field - ## ..reference-equivalence + ## ..reference_equivalence ## ## #Method - ## ..reference-equivalence - ## ## #Interface-Method - ## ..reference-equivalence - ## ## #Name-And-Type - ## ..name-and-type-equivalence + ## ..reference_equivalence + ## ## #Interface_Method + ## ..reference_equivalence + ## ## #Name_And_Type + ## ..name_and_type_equivalence ## ) ) (def: #export writer (Writer Constant) - (with-expansions [<constants> (as-is [#UTF8 /tag.utf8 ..utf8-writer] - [#Integer /tag.integer ..integer-writer] - [#Float /tag.float ..float-writer] - [#Long /tag.long ..long-writer] - [#Double /tag.double ..double-writer] - [#Class /tag.class ..class-writer] - [#String /tag.string ..string-writer] - [#Field /tag.field ..reference-writer] - [#Method /tag.method ..reference-writer] - [#Interface-Method /tag.interface-method ..reference-writer] - [#Name-And-Type /tag.name-and-type ..name-and-type-writer] - ## TODO: Method-Handle - ## TODO: Method-Type - ## TODO: Invoke-Dynamic + (with_expansions [<constants> (as_is [#UTF8 /tag.utf8 ..utf8_writer] + [#Integer /tag.integer ..integer_writer] + [#Float /tag.float ..float_writer] + [#Long /tag.long ..long_writer] + [#Double /tag.double ..double_writer] + [#Class /tag.class ..class_writer] + [#String /tag.string ..string_writer] + [#Field /tag.field ..reference_writer] + [#Method /tag.method ..reference_writer] + [#Interface_Method /tag.interface_method ..reference_writer] + [#Name_And_Type /tag.name_and_type ..name_and_type_writer] + ## TODO: Method_Handle + ## TODO: Method_Type + ## TODO: Invoke_Dynamic )] (function (_ value) (case value |