Skip to content

Commit

Permalink
Add interface for S_Core
Browse files Browse the repository at this point in the history
  • Loading branch information
DZakh committed Oct 10, 2023
1 parent e12d7c4 commit 5da5405
Show file tree
Hide file tree
Showing 3 changed files with 629 additions and 819 deletions.
163 changes: 10 additions & 153 deletions src/S.bs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,11 @@ import * as S_Core$RescriptStruct from "./S_Core.bs.mjs";

var Literal = S_Core$RescriptStruct.Literal;

var Path_toArray = S_Core$RescriptStruct.Path.toArray;

var Path_fromArray = S_Core$RescriptStruct.Path.fromArray;

var Path_fromLocation = S_Core$RescriptStruct.Path.fromLocation;

var Path_concat = S_Core$RescriptStruct.Path.concat;

var Path = {
empty: "",
dynamic: "[]",
toArray: Path_toArray,
fromArray: Path_fromArray,
fromLocation: Path_fromLocation,
concat: Path_concat
};
var Path = S_Core$RescriptStruct.Path;

var Raised = S_Core$RescriptStruct.Raised;

var Error_class = S_Core$RescriptStruct.$$Error.$$class;

var Error_make = S_Core$RescriptStruct.$$Error.make;

var Error_raise = S_Core$RescriptStruct.$$Error.raise;

var Error_message = S_Core$RescriptStruct.$$Error.message;

var Error_reason = S_Core$RescriptStruct.$$Error.reason;

var $$Error = {
$$class: Error_class,
make: Error_make,
raise: Error_raise,
message: Error_message,
reason: Error_reason
};
var $$Error = S_Core$RescriptStruct.$$Error;

var never = S_Core$RescriptStruct.never;

Expand Down Expand Up @@ -129,21 +98,11 @@ var classify = S_Core$RescriptStruct.classify;

var setName = S_Core$RescriptStruct.setName;

var Object_factory = S_Core$RescriptStruct.$$Object.factory;

var Object_strip = S_Core$RescriptStruct.$$Object.strip;

var Object_strict = S_Core$RescriptStruct.$$Object.strict;

var $$Object = {
factory: Object_factory,
strip: Object_strip,
strict: Object_strict
};
var $$Object = S_Core$RescriptStruct.$$Object;

var object = S_Core$RescriptStruct.object;

var Tuple = {};
var Tuple = S_Core$RescriptStruct.Tuple;

var tuple = S_Core$RescriptStruct.tuple;

Expand All @@ -153,119 +112,17 @@ var tuple2 = S_Core$RescriptStruct.tuple2;

var tuple3 = S_Core$RescriptStruct.tuple3;

var Option_default = S_Core$RescriptStruct.$$Option.$$default;

var Option_getOr = S_Core$RescriptStruct.$$Option.getOr;

var Option_getOrWith = S_Core$RescriptStruct.$$Option.getOrWith;

var $$Option = {
$$default: Option_default,
getOr: Option_getOr,
getOrWith: Option_getOrWith
};

var String_Refinement = {};

var String_refinements = S_Core$RescriptStruct.$$String.refinements;

var String_min = S_Core$RescriptStruct.$$String.min;

var String_max = S_Core$RescriptStruct.$$String.max;

var String_length = S_Core$RescriptStruct.$$String.length;

var String_email = S_Core$RescriptStruct.$$String.email;

var String_uuid = S_Core$RescriptStruct.$$String.uuid;

var String_cuid = S_Core$RescriptStruct.$$String.cuid;

var String_url = S_Core$RescriptStruct.$$String.url;

var String_pattern = S_Core$RescriptStruct.$$String.pattern;

var String_datetime = S_Core$RescriptStruct.$$String.datetime;

var String_trim = S_Core$RescriptStruct.$$String.trim;

var $$String = {
Refinement: String_Refinement,
refinements: String_refinements,
min: String_min,
max: String_max,
length: String_length,
email: String_email,
uuid: String_uuid,
cuid: String_cuid,
url: String_url,
pattern: String_pattern,
datetime: String_datetime,
trim: String_trim
};

var Int_Refinement = {};

var Int_refinements = S_Core$RescriptStruct.Int.refinements;

var Int_min = S_Core$RescriptStruct.Int.min;

var Int_max = S_Core$RescriptStruct.Int.max;

var Int_port = S_Core$RescriptStruct.Int.port;

var Int = {
Refinement: Int_Refinement,
refinements: Int_refinements,
min: Int_min,
max: Int_max,
port: Int_port
};

var Float_Refinement = {};

var Float_refinements = S_Core$RescriptStruct.Float.refinements;

var Float_min = S_Core$RescriptStruct.Float.min;

var Float_max = S_Core$RescriptStruct.Float.max;

var Float = {
Refinement: Float_Refinement,
refinements: Float_refinements,
min: Float_min,
max: Float_max
};

var Array_Refinement = {};

var Array_refinements = S_Core$RescriptStruct.$$Array.refinements;

var Array_min = S_Core$RescriptStruct.$$Array.min;

var Array_max = S_Core$RescriptStruct.$$Array.max;

var Array_length = S_Core$RescriptStruct.$$Array.length;
var $$Option = S_Core$RescriptStruct.$$Option;

var $$Array = {
Refinement: Array_Refinement,
refinements: Array_refinements,
min: Array_min,
max: Array_max,
length: Array_length
};
var $$String = S_Core$RescriptStruct.$$String;

var Metadata_Id = S_Core$RescriptStruct.Metadata.Id;
var Int = S_Core$RescriptStruct.Int;

var Metadata_get = S_Core$RescriptStruct.Metadata.get;
var Float = S_Core$RescriptStruct.Float;

var Metadata_set = S_Core$RescriptStruct.Metadata.set;
var $$Array = S_Core$RescriptStruct.$$Array;

var Metadata = {
Id: Metadata_Id,
get: Metadata_get,
set: Metadata_set
};
var Metadata = S_Core$RescriptStruct.Metadata;

var inline = S_Core$RescriptStruct.inline;

Expand Down
Loading

2 comments on commit 5da5405

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 5da5405 Previous: 80ac4f1 Ratio
Parse string 701829787 ops/sec (±0.42%) 706149725 ops/sec (±0.41%) 1.01
Serialize string 706498623 ops/sec (±0.18%) 693539015 ops/sec (±2.10%) 0.98
Advanced object struct factory 287461 ops/sec (±0.48%) 286556 ops/sec (±0.58%) 1.00
Parse advanced object 22947354 ops/sec (±0.25%) 22341504 ops/sec (±0.24%) 0.97
Create and parse advanced object 25243 ops/sec (±0.70%) 58042 ops/sec (±1.08%) 2.30
Parse advanced strict object 12201899 ops/sec (±0.15%) 13141235 ops/sec (±0.73%) 1.08
Serialize advanced object 691430197 ops/sec (±0.14%) 32617508 ops/sec (±0.33%) 0.04717397091061674

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 5da5405 Previous: 80ac4f1 Ratio
Create and parse advanced object 25243 ops/sec (±0.70%) 58042 ops/sec (±1.08%) 2.30

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.