lawspec 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +3 -3
- package/bin/lawspec.mjs +1 -1
- package/build.json +15 -15
- package/core.wasm +0 -0
- package/examples/specs/sessions.lawspec +4 -3
- package/index.d.ts +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.19.1
|
|
6
|
+
|
|
7
|
+
- A handle's Kotlin type binding can give the native class's type
|
|
8
|
+
`arguments` (`["kotlin.Int"]`), so generated Kotlin names the handle's type
|
|
9
|
+
in full instead of `kotlin.Any`.
|
|
10
|
+
- A Haskell method binding on a handle with no type binding names the handle
|
|
11
|
+
and the `lawspec.json` entry to add.
|
|
12
|
+
- The sessions example's adapters are asynchronous, so the JavaScript and
|
|
13
|
+
TypeScript ones await each receive instead of using `receiveNow`.
|
|
14
|
+
|
|
3
15
|
## 0.19.0
|
|
4
16
|
|
|
5
17
|
### Stateful models
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Node 22+ and the selected target's build tools are required. No Haskell
|
|
|
30
30
|
toolchain is needed. The reference platforms are macOS and Linux.
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
npm install --save-dev lawspec@0.19.
|
|
33
|
+
npm install --save-dev lawspec@0.19.1
|
|
34
34
|
npx lawspec --version
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -40,8 +40,8 @@ LawSpec can create `package.json` and its test script:
|
|
|
40
40
|
```sh
|
|
41
41
|
mkdir lawspec-example
|
|
42
42
|
cd lawspec-example
|
|
43
|
-
npm exec --package=lawspec@0.19.
|
|
44
|
-
npm install --save-dev lawspec@0.19.
|
|
43
|
+
npm exec --package=lawspec@0.19.1 -- lawspec init --target javascript
|
|
44
|
+
npm install --save-dev lawspec@0.19.1
|
|
45
45
|
npx lawspec check
|
|
46
46
|
npx lawspec explain 'example.atoi_codec::itoa and then atoi yields a'
|
|
47
47
|
npx lawspec doctor
|
package/bin/lawspec.mjs
CHANGED
package/build.json
CHANGED
|
@@ -176,8 +176,8 @@
|
|
|
176
176
|
],
|
|
177
177
|
"digests": {
|
|
178
178
|
"dev/Gen/Embed.hs": "98a186594c3c38a65aad1203d5730ce352b309f92e1990ccc508e7a5e00f8f35",
|
|
179
|
-
"lawspec.cabal": "
|
|
180
|
-
"package.yaml": "
|
|
179
|
+
"lawspec.cabal": "49b548507a6af8fc1d3fa83defcb6de139bcf45b8e6043668e12011795eae7ec",
|
|
180
|
+
"package.yaml": "013801d35e8c72fe06b20fbf2a352d18228477f8941faa66342c42b8b4398632",
|
|
181
181
|
"runtime/LawSpecCodecs.hs": "1b3f6b40ad49928cf5e9386e06bc2992c9f1271754351b9fa3075e50346ef03b",
|
|
182
182
|
"runtime/LawSpecCollectionCodecs.hs": "74caa786801c5142ed040897c7ebb7373abf49ee49e02af53e466646fb624f47",
|
|
183
183
|
"runtime/LawSpecDataStrategies.hs": "9cc5b98476364a6c255dc3eb40c53d65b4a9d4ab0c3961a806b3515a8d5e8f7f",
|
|
@@ -203,8 +203,8 @@
|
|
|
203
203
|
"runtime/lawspec_schema.mjs": "89b3b76ffd0ddd70c4bd49b73ca08a359d70aa3994745746978ed615676fde26",
|
|
204
204
|
"runtime/lawspec_schema.py": "4c8ea9895f2f93ff5d34c4df414305bc0c2a151edd4e192ebc8982b35fa7782d",
|
|
205
205
|
"runtime/lawspec_strategies.rs": "6c21050184ac20b2ad38e99f47b78fb013f1916389e85e522dd73209133af990",
|
|
206
|
-
"runtime/rust/Cargo.lock": "
|
|
207
|
-
"runtime/rust/Cargo.toml": "
|
|
206
|
+
"runtime/rust/Cargo.lock": "3a1d2207563535ef88fc7d5dc45ed42eaec1ade27229ed81f4837a236ed27319",
|
|
207
|
+
"runtime/rust/Cargo.toml": "0fcc1650d227d553d953b2e09f3fe8436d3183994646a0194628d72545e536aa",
|
|
208
208
|
"src/LawSpec/Actors.hs": "98677022a6d596bbdbb32c69a23bdc0ade9dd18bb60067bdfb2c280fc0c54089",
|
|
209
209
|
"src/LawSpec/Actors/Go.hs": "81f732637abd28e5d7ba1ba94dd0a8bf88722accf9c2583453f7dae176460429",
|
|
210
210
|
"src/LawSpec/Actors/Haskell.hs": "7fcc71ca1f7eb2e57aba631f0cf9334a1dd6ab644211126fa831535bbfce90a8",
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"src/LawSpec/Collections.hs": "504af1d31c267287456fde20d2782c72c519abf4ce26b083e59a7aefa876a768",
|
|
223
223
|
"src/LawSpec/Common.hs": "107612a8aaa787488413acf9c1a56622004d3bff251db89b99928343e6070883",
|
|
224
224
|
"src/LawSpec/Compile.hs": "efca518b2f0a7dff48927dedc3d6752e10228520d1cae4567aabc2bfac3d94a1",
|
|
225
|
-
"src/LawSpec/Core.hs": "
|
|
225
|
+
"src/LawSpec/Core.hs": "73b08330f973a47c792ec879a153687438efb3f97e26f5e052d2f23f9cdc4053",
|
|
226
226
|
"src/LawSpec/Core/DefinitionContracts.hs": "b7f60f038b231187ecf898e585ae1a8fb1fc113bb55bad6d1bb2660350fd969e",
|
|
227
227
|
"src/LawSpec/Core/Definitions.hs": "a57e30f6864a6bae7e60cd08ef968b1adc9bbd1c86d4b20c405276eccd604f8d",
|
|
228
228
|
"src/LawSpec/Core/Eval.hs": "7c55598054f76e5f3c332a53df46bc2090a4914e8e1460671896f50db0102a9d",
|
|
@@ -242,11 +242,11 @@
|
|
|
242
242
|
"src/LawSpec/Core/Types.hs": "a684e003ed64924cb54717f0e4b166fea62a2ac0fe5c9f8851a865f4dcb9858e",
|
|
243
243
|
"src/LawSpec/Core/Validate.hs": "74c2a51eb913f8414268064f22d2d5d97ebfb0e4797e146b229076c29ac38726",
|
|
244
244
|
"src/LawSpec/Core/Value.hs": "52fedabbc07c8c65acc5be1efc7b4860bee47b58931ef76d26fcbfc8a280bf41",
|
|
245
|
-
"src/LawSpec/CoreEmit.hs": "
|
|
245
|
+
"src/LawSpec/CoreEmit.hs": "ed22e992e34a5328e6eb5794af81942e2b66f60b23632f15e0e261d35157e107",
|
|
246
246
|
"src/LawSpec/CoreNativeScalarEmit.hs": "5182e898f247376d4846336e0aecd22685dd2f6d9a41897afb67b0b4e732b82e",
|
|
247
247
|
"src/LawSpec/CorePersist.hs": "d28fd82240b9926201cf3befe45e2190c57bbed899e3f7d861220aa9580ddaa5",
|
|
248
248
|
"src/LawSpec/CoreScalarEmit.hs": "163669ab934a1736976437394f3f4528ca7ae85dc14facebef6ec2fa576b92f0",
|
|
249
|
-
"src/LawSpec/Data.hs": "
|
|
249
|
+
"src/LawSpec/Data.hs": "99fe2a88d2206909c1ee63d05d224111449a5a8c15727cada961ec498a8425db",
|
|
250
250
|
"src/LawSpec/DataNames.hs": "2eeb0d215131981a2271725a50c21dce44c7146a167025eb239a83922fdecaf6",
|
|
251
251
|
"src/LawSpec/DefinitionTotality.hs": "af3aa9f7495344ea34c90cf87664f3ec2d9f95474ef273905fc6c9b17edd5d80",
|
|
252
252
|
"src/LawSpec/Dependencies.hs": "b748d2231f543a878e2ff3816f8a027285c610555821856383e8d1853e4c7151",
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
"src/LawSpec/HaskellData.hs": "6366fad5cec25eeffee4ddcfe8a01672d2b1ac9c96144088ccf80061ef690fb1",
|
|
270
270
|
"src/LawSpec/HaskellDefinitions.hs": "9e99c5ef7110e286b92acd08efd8890340b9c2d242053568804648789907479b",
|
|
271
271
|
"src/LawSpec/HaskellExpr.hs": "f7ef064ac6700c027de4bd71bddeb3236853232cf7a39bed61de16153539b401",
|
|
272
|
-
"src/LawSpec/HaskellNativeBinding.hs": "
|
|
272
|
+
"src/LawSpec/HaskellNativeBinding.hs": "6037c7874c186b4de68d4a7982d14a695fd21325e78e5ce3eebe19a2128b01d8",
|
|
273
273
|
"src/LawSpec/HaskellProperties.hs": "24f0fc966e3c1f59761010ea1860bb4fffc2fd4fe57f2e3159371b021881a2f1",
|
|
274
274
|
"src/LawSpec/HaskellTestHelpers.hs": "a0d3bef096b9a8bddfbb213e554e00535a3a7691c4ef95cb6c61a4eb6cea5098",
|
|
275
275
|
"src/LawSpec/HaskellTypeRefs.hs": "2225b2a5e2ab3662e7202d23b24f4d6db48353b35ae28df8acd2b92fd2b97574",
|
|
@@ -277,13 +277,13 @@
|
|
|
277
277
|
"src/LawSpec/IndexTerm.hs": "1c694f279b934e7b853c0028158c2754048928deb45fb7d65abc1d98da382bcb",
|
|
278
278
|
"src/LawSpec/Indexed.hs": "1e7ed53653cabc097f75dcf350c81facf9feb30af73f3e21f9344665fc316387",
|
|
279
279
|
"src/LawSpec/Inference.hs": "40693bcf11935f812bac171e981476acd978a16d126855c9ddf385a8b1cc23c3",
|
|
280
|
-
"src/LawSpec/JavaData.hs": "
|
|
280
|
+
"src/LawSpec/JavaData.hs": "6173a61ffd95e1f671a0df1f85c056a1f785f6fa66c4d55d09d2420400cfcb94",
|
|
281
281
|
"src/LawSpec/JavaDefinitions.hs": "587b82efbe07823defdd2143469b4632bd86b21f0d9644a4929cf58d1d0a2342",
|
|
282
282
|
"src/LawSpec/JavaExpr.hs": "fb1d3e64f3288e557720dead7738eb4f2a59d4563e5be4a742e1582829f19d3e",
|
|
283
283
|
"src/LawSpec/JavaNativeBinding.hs": "2c2bb31c121f54ba1b43b201163398ac562a3b99e7b9190ecab1c43ac1a2abd0",
|
|
284
284
|
"src/LawSpec/JavaProperties.hs": "b57a30301ac295dfbd6d4d7ff0d94f2c788fc892c184fb7661b338aad6d89f7e",
|
|
285
285
|
"src/LawSpec/JavaTestHelpers.hs": "3eab1c7f55ddbf34c4ab53e4718d347f5fd9df22900dc4d34808b31590f4cac4",
|
|
286
|
-
"src/LawSpec/KotlinData.hs": "
|
|
286
|
+
"src/LawSpec/KotlinData.hs": "ccbef310915bd4c998bb9566c0e741be1275109ea536947a9844794eaeecaba0",
|
|
287
287
|
"src/LawSpec/KotlinDefinitions.hs": "4d49a62a1f8ea31a31dc79a6f4aba318f2f71552c495a67499f3cec6dc17fa60",
|
|
288
288
|
"src/LawSpec/KotlinExpr.hs": "20312f0774f1d0832a21a19b93c8103e2791ecd32a827d8e9c4f2b4830a996a0",
|
|
289
289
|
"src/LawSpec/KotlinNativeBinding.hs": "12a4f40de319b87a6f5a2e48ea2616010d620d00e2e3b67de063947e958f7da8",
|
|
@@ -294,8 +294,8 @@
|
|
|
294
294
|
"src/LawSpec/Memo.hs": "1230a08b003cc6eee0db951b55a93f9ec573e5b6752c63d65d6c3487927b0b4e",
|
|
295
295
|
"src/LawSpec/Model.hs": "c645aad0f37f175a099865f467864391cc0cb8e76e4f6b3e1297d7ac6c31260d",
|
|
296
296
|
"src/LawSpec/ModelTests.hs": "a5905c0c4a493129c19cc135fb606dacd12fc72d495df471d63e7d3cacdfe925",
|
|
297
|
-
"src/LawSpec/NativeBinding.hs": "
|
|
298
|
-
"src/LawSpec/NativeRequest.hs": "
|
|
297
|
+
"src/LawSpec/NativeBinding.hs": "a2fae69f02eaa21b61c61496587f46508cab142b07434ad952cb4c154d9e0d04",
|
|
298
|
+
"src/LawSpec/NativeRequest.hs": "978834c3697866ee428ec4667243384de48b91c850357b683faca8a635a978ab",
|
|
299
299
|
"src/LawSpec/Packages.hs": "161fc68a9959a80762ca4ece405240351e3180ea4dbb2bf148eaca6562fb7c30",
|
|
300
300
|
"src/LawSpec/Parser.hs": "a687fb2d2a12d37a7fad97eb92375c7b425fa823cd85133e2f660f78a62da2c3",
|
|
301
301
|
"src/LawSpec/Persist.hs": "f29c228ba12605f9ddd393f2535a306e4ff41aa38a2e256840ef547be54dacbe",
|
|
@@ -346,10 +346,10 @@
|
|
|
346
346
|
"wasm/app/Exports.hs": "4ecbdac8faa2449e6fc61b93c82e6278fa14374154f29b4dacf0eef433f06a47",
|
|
347
347
|
"wasm/cabal.project": "021e560afdc5eb4cb7169e7119ecb8f92c9ee170245af909c94b612941bff5cc",
|
|
348
348
|
"wasm/cabal.project.freeze": "733dbed3d2ecccb26e874fd58f136296dad772184deb1658c196b5d54a0814dc",
|
|
349
|
-
"wasm/lawspec-wasm.cabal": "
|
|
350
|
-
"npm/core.wasm": "
|
|
349
|
+
"wasm/lawspec-wasm.cabal": "efb684af5b2f141714ce02867c7a347332fd6296bdb94d5de97d4d2b32ab631e",
|
|
350
|
+
"npm/core.wasm": "be25d0010892423a515995e68aabc622b0b09974c7e37b5bde0f192157166f00",
|
|
351
351
|
"npm/core_jsffi.js": "88d136efe92f7cff5758c8fec8d9b6bbc9707fe37741cebeeb415fe34ce3d72b",
|
|
352
352
|
"npm/api.mjs": "19e1624f91258c1397f3212faf65b407c62671b0fc5b118520e6a91f7ad7c6ba",
|
|
353
|
-
"npm/index.d.ts": "
|
|
353
|
+
"npm/index.d.ts": "58ebf96832216d675857bfcc0905e7395172078b726b3da9165e2b96214f35bb"
|
|
354
354
|
}
|
|
355
355
|
}
|
package/core.wasm
CHANGED
|
Binary file
|
|
@@ -18,11 +18,12 @@ protocol Hire is
|
|
|
18
18
|
send Serve
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
-- Adds through a server process.
|
|
22
|
-
|
|
21
|
+
-- Adds through a server process. Processes that talk over channels wait for
|
|
22
|
+
-- each other, so these adapters are asynchronous.
|
|
23
|
+
async add :: Int32 -> Int32 -> Integer
|
|
23
24
|
|
|
24
25
|
-- Adds through a worker that is handed the server's end over a Hire channel.
|
|
25
|
-
addHired :: Int32 -> Int32 -> Integer
|
|
26
|
+
async addHired :: Int32 -> Int32 -> Integer
|
|
26
27
|
|
|
27
28
|
law `a server adds` is
|
|
28
29
|
definition is
|
package/index.d.ts
CHANGED
|
@@ -186,6 +186,7 @@ export interface NativeTypeBinding {
|
|
|
186
186
|
native: NativeReference;
|
|
187
187
|
constructors?: NativeConstructorBinding[];
|
|
188
188
|
codec?: NativeCodecBinding;
|
|
189
|
+
arguments?: string[];
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
export interface NativeGeneratorBinding {
|
|
@@ -196,7 +197,9 @@ export interface NativeGeneratorBinding {
|
|
|
196
197
|
|
|
197
198
|
export interface NativeFunctionBinding {
|
|
198
199
|
declaration: string;
|
|
199
|
-
native
|
|
200
|
+
native?: NativeReference;
|
|
201
|
+
method?: string;
|
|
202
|
+
constructor?: NativeReference;
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
export interface NativeGoImport {
|