(.module: [lux #* [abstract [equivalence (#+ Equivalence)]] [data ["." product] ["." format #_ ["#" binary (#+ Writer)]]] [math [number ["n" nat]]]] ["." // #_ ["//#" /// #_ [constant (#+ Class)] ["#." index (#+ Index)] [bytecode ["#." address (#+ Address)]] [encoding ["#." unsigned (#+ U2)]]]]) (type: #export Exception {#start Address #end Address #handler Address #catch (Index Class)}) (def: #export equivalence (Equivalence Exception) ($_ product.equivalence ////address.equivalence ////address.equivalence ////address.equivalence ////index.equivalence )) ## https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3 (def: #export length Nat ($_ n.+ ## u2 start_pc; ////unsigned.bytes/2 ## u2 end_pc; ////unsigned.bytes/2 ## u2 handler_pc; ////unsigned.bytes/2 ## u2 catch_type; ////unsigned.bytes/2 )) (def: #export writer (Writer Exception) ($_ format.and ////address.writer ////address.writer ////address.writer ////index.writer ))