@@ -64,42 +64,6 @@ function get_global() {
6464 throw new Error ( 'No global state found' ) ;
6565}
6666
67- function defstruct ( defaults ) {
68- return class {
69- constructor ( update = { } ) {
70- const the_values = Object . assign ( defaults , update ) ;
71- Object . assign ( this , the_values ) ;
72- }
73-
74- static create ( updates = { } ) {
75- const x = new this ( updates ) ;
76- return Object . freeze ( x ) ;
77- }
78- } ;
79- }
80-
81- function defexception ( defaults ) {
82- return class extends Error {
83- constructor ( update = { } ) {
84- const message = update . message || '' ;
85- super ( message ) ;
86-
87- const the_values = Object . assign ( defaults , update ) ;
88- Object . assign ( this , the_values ) ;
89-
90- this . name = this . constructor . name ;
91- this . message = message ;
92- this [ Symbol . for ( '__exception__' ) ] = true ;
93- Error . captureStackTrace ( this , this . constructor . name ) ;
94- }
95-
96- static create ( updates = { } ) {
97- const x = new this ( updates ) ;
98- return Object . freeze ( x ) ;
99- }
100- } ;
101- }
102-
10367function defprotocol ( spec ) {
10468 return new Protocol ( spec ) ;
10569}
@@ -134,8 +98,6 @@ function build_namespace(ns, ns_string) {
13498export default {
13599 call_property,
136100 get_global,
137- defstruct,
138- defexception,
139101 defprotocol,
140102 defimpl,
141103 build_namespace,
0 commit comments