lawspec 0.30.0 → 0.31.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 +405 -1
- package/README.md +19 -7
- package/api.mjs +1 -0
- package/beam-doctor.mjs +2 -2
- package/bin/lawspec.mjs +104 -96
- package/build.json +498 -406
- package/component-packages.mjs +339 -0
- package/component.d.ts +46 -0
- package/component.mjs +208 -0
- package/core.wasm +2 -2
- package/core_jsffi.js +5 -5
- package/examples/native-payments/clojure/lawspec.edn +48 -0
- package/examples/native-payments/clojure/src/domain/payments.clj +1 -1
- package/examples/native-payments/clojure/test/domain/payment_generators.clj +1 -1
- package/examples/native-payments/csharp/lawspec.edn +48 -0
- package/examples/native-payments/elixir/lawspec.edn +123 -0
- package/examples/native-payments/erlang/lawspec.edn +128 -0
- package/examples/native-payments/fsharp/lawspec.edn +123 -0
- package/examples/native-payments/gleam/lawspec.edn +123 -0
- package/examples/native-payments/go/lawspec.edn +123 -0
- package/examples/native-payments/groovy/lawspec.edn +123 -0
- package/examples/native-payments/haskell/lawspec.edn +123 -0
- package/examples/native-payments/java/lawspec.edn +123 -0
- package/examples/native-payments/javascript/lawspec.edn +123 -0
- package/examples/native-payments/kotlin/lawspec.edn +123 -0
- package/examples/native-payments/prolog/lawspec.edn +48 -0
- package/examples/native-payments/python/lawspec.edn +123 -0
- package/examples/native-payments/rust/lawspec.edn +124 -0
- package/examples/native-payments/scala/lawspec.edn +123 -0
- package/examples/native-payments/swift/lawspec.edn +123 -0
- package/examples/native-payments/typescript/lawspec.edn +123 -0
- package/examples/packages/orders/lawspec.edn +25 -0
- package/examples/packages/shop-domain/lawspec.edn +13 -0
- package/examples/packages/shop-tax-1/lawspec.edn +9 -0
- package/examples/packages/shop-tax-2/lawspec.edn +9 -0
- package/examples/specs/handler_bindings.lawspec +2 -2
- package/files.mjs +2 -1
- package/go.mod +4 -0
- package/index.d.ts +135 -2
- package/input-files.mjs +47 -0
- package/launcher.mjs +33 -13
- package/learn/adapters.mjs +226 -0
- package/learn/app.mjs +1279 -0
- package/learn/assert.mjs +33 -0
- package/learn/assets.mjs +15 -0
- package/learn/browser-runtime.mjs +58 -0
- package/learn/bundle.mjs +118 -0
- package/learn/compile-worker.mjs +106 -0
- package/learn/compiler.mjs +230 -0
- package/learn/coverage.json +8187 -0
- package/learn/curriculum.json +2952 -0
- package/learn/fantomas-worker.mjs +25 -0
- package/learn/format-worker.mjs +148 -0
- package/learn/fsharp.mjs +83 -0
- package/learn/harness-host.mjs +22 -0
- package/learn/index.html +326 -0
- package/learn/lawspec-core.mjs +223 -0
- package/learn/lawspec-language.mjs +69 -0
- package/learn/node-test.mjs +11 -0
- package/learn/presentation.mjs +73 -0
- package/learn/runner.mjs +72 -0
- package/learn/sandbox-frame.html +34 -0
- package/learn/sandbox.mjs +91 -0
- package/learn/store.mjs +141 -0
- package/learn/story.mjs +42 -0
- package/learn/style-options.json +16 -0
- package/learn/style.css +1023 -0
- package/learn/theme.js +77 -0
- package/learn/typescript.mjs +53 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-mono-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-overpass-LICENSE.txt +93 -0
- package/learn/vendor/assemblies.json +1 -0
- package/learn/vendor/editor-worker.js +30 -0
- package/learn/vendor/editor.css +1 -0
- package/learn/vendor/editor.mjs +931 -0
- package/learn/vendor/esbuild-wasm-LICENSE.txt +21 -0
- package/learn/vendor/esbuild.mjs +2683 -0
- package/learn/vendor/esbuild.wasm +0 -0
- package/learn/vendor/fable-library/Array.js +1347 -0
- package/learn/vendor/fable-library/Async.js +134 -0
- package/learn/vendor/fable-library/AsyncBuilder.js +183 -0
- package/learn/vendor/fable-library/BigInt.js +306 -0
- package/learn/vendor/fable-library/BitConverter.js +138 -0
- package/learn/vendor/fable-library/Boolean.js +22 -0
- package/learn/vendor/fable-library/CHANGELOG.md +242 -0
- package/learn/vendor/fable-library/Char.js +202 -0
- package/learn/vendor/fable-library/Choice.js +184 -0
- package/learn/vendor/fable-library/CollectionUtil.js +182 -0
- package/learn/vendor/fable-library/ConditionalWeakTable.js +21 -0
- package/learn/vendor/fable-library/Date.js +841 -0
- package/learn/vendor/fable-library/DateOffset.js +261 -0
- package/learn/vendor/fable-library/DateOnly.js +124 -0
- package/learn/vendor/fable-library/Decimal.js +238 -0
- package/learn/vendor/fable-library/Double.js +47 -0
- package/learn/vendor/fable-library/Encoding.js +185 -0
- package/learn/vendor/fable-library/Event.js +93 -0
- package/learn/vendor/fable-library/FSharp.Collections.js +45 -0
- package/learn/vendor/fable-library/FSharp.Core.CompilerServices.js +27 -0
- package/learn/vendor/fable-library/FSharp.Core.js +156 -0
- package/learn/vendor/fable-library/Global.js +29 -0
- package/learn/vendor/fable-library/Guid.js +161 -0
- package/learn/vendor/fable-library/Int32.js +135 -0
- package/learn/vendor/fable-library/List.js +1323 -0
- package/learn/vendor/fable-library/Long.js +47 -0
- package/learn/vendor/fable-library/MailboxProcessor.js +94 -0
- package/learn/vendor/fable-library/Map.js +1396 -0
- package/learn/vendor/fable-library/MapUtil.js +130 -0
- package/learn/vendor/fable-library/MutableMap.js +339 -0
- package/learn/vendor/fable-library/MutableSet.js +233 -0
- package/learn/vendor/fable-library/Native.js +14 -0
- package/learn/vendor/fable-library/Numeric.js +75 -0
- package/learn/vendor/fable-library/Observable.js +113 -0
- package/learn/vendor/fable-library/Option.js +104 -0
- package/learn/vendor/fable-library/README.md +3 -0
- package/learn/vendor/fable-library/Random.js +172 -0
- package/learn/vendor/fable-library/Range.js +45 -0
- package/learn/vendor/fable-library/Reflection.js +479 -0
- package/learn/vendor/fable-library/RegExp.js +141 -0
- package/learn/vendor/fable-library/Result.js +165 -0
- package/learn/vendor/fable-library/Seq.js +1417 -0
- package/learn/vendor/fable-library/Seq2.js +111 -0
- package/learn/vendor/fable-library/Set.js +1816 -0
- package/learn/vendor/fable-library/String.js +674 -0
- package/learn/vendor/fable-library/System.Collections.Generic.js +333 -0
- package/learn/vendor/fable-library/System.Text.js +200 -0
- package/learn/vendor/fable-library/System.js +289 -0
- package/learn/vendor/fable-library/TimeOnly.js +122 -0
- package/learn/vendor/fable-library/TimeSpan.js +180 -0
- package/learn/vendor/fable-library/Timer.js +67 -0
- package/learn/vendor/fable-library/Types.js +198 -0
- package/learn/vendor/fable-library/Unicode.13.0.0.js +4 -0
- package/learn/vendor/fable-library/Uri.js +165 -0
- package/learn/vendor/fable-library/Util.js +796 -0
- package/learn/vendor/fable-library/big.d.ts +338 -0
- package/learn/vendor/fable-library/lib/big.js +825 -0
- package/learn/vendor/fable-library/package.json +24 -0
- package/learn/vendor/fable-library/quotation.js +618 -0
- package/learn/vendor/fable.js +430 -0
- package/learn/vendor/fantomas/FSharp.Core.uawo19tl4c.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.Core.stnanlnpyw.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.FCS.lqohfu5o9y.wasm +0 -0
- package/learn/vendor/fantomas/LawSpec.Learn.Formatter.5arcua4vy0.wasm +0 -0
- package/learn/vendor/fantomas/LawSpec.Learn.Formatter.u1ne3a6xd2.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.CSharp.mp8lhr6rez.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.0e5fchkecn.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.Core.17wn27qal2.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Primitives.9d566sle9e.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Registry.52dy96yk8i.wasm +0 -0
- package/learn/vendor/fantomas/System.AppContext.jwujeh069z.wasm +0 -0
- package/learn/vendor/fantomas/System.Buffers.y0isk1x97h.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Concurrent.x5koi7bzem.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Immutable.diwg7advch.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.NonGeneric.4089xs440e.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Specialized.hj81u7zblb.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.nvrdeoknr1.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Annotations.yatcnfjeuk.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.DataAnnotations.led9l5awu3.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.EventBasedAsync.hpvp6cf4de.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Primitives.v7cajwpaqo.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.TypeConverter.xk1hnyt762.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.rrnda1lucx.wasm +0 -0
- package/learn/vendor/fantomas/System.Configuration.bn9vghjcq8.wasm +0 -0
- package/learn/vendor/fantomas/System.Console.09ajpiafhz.wasm +0 -0
- package/learn/vendor/fantomas/System.Core.wc649o5mw9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.Common.s4cowzd9a9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.DataSetExtensions.5fm360ikxl.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.fsu4j4t4jw.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Contracts.p74re5oxzn.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Debug.622sixg49n.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.DiagnosticSource.2j35bc2g2b.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.FileVersionInfo.7n0wdvltaa.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Process.8iffh49mew.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.StackTrace.1yz88vico8.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TextWriterTraceListener.ua8iuh2vhj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tools.roy5445ugj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TraceSource.6qx1ldzz7g.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tracing.b4799zpaas.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.8gcjjqj0pu.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.Primitives.y2uveru2yk.wasm +0 -0
- package/learn/vendor/fantomas/System.Dynamic.Runtime.023zrvzh9x.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Asn1.znpklkbgqv.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Tar.5yybjepfi2.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Calendars.10g6hyjy3k.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Extensions.hrinfrismg.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.uvs4rah8fk.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.4j645gw40d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.2z7vdt6tfb.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.Brotli.fv80xs79j3.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.FileSystem.88jdddz3sw.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.ZipFile.jkn9avr4vo.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.AccessControl.yme0uhbu37.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.DriveInfo.qas7wf73rs.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Primitives.d1jmhkzu0e.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Watcher.z570derp0d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.o6jtz51fup.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.IsolatedStorage.hqyeyb5ipe.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.MemoryMappedFiles.zhamjnusxd.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipelines.wrmw5vws31.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.AccessControl.qcancj8gj2.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.zhcyguvwkr.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.UnmanagedMemoryStream.o8cpjnlard.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.AsyncEnumerable.hyc0b7okjw.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Expressions.ldibvm0efj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Parallel.2buevezvch.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Queryable.cvq43g1awj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.lz6mvi0hm2.wasm +0 -0
- package/learn/vendor/fantomas/System.Memory.3jekerw0ga.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.Json.8k237kkwec.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.cityx2bvcl.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.HttpListener.s1jreclykx.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Mail.cmlj4c0gto.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NameResolution.q3gf18q13l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NetworkInformation.xaz5tjw7d0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Ping.a40atim1h0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Primitives.i88i20r8sr.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Quic.hx06eo5xkj.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Requests.hkjxlfe5f5.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Security.ch34yya69o.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServerSentEvents.0u7o0jk3p1.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServicePoint.xbhxnytx4l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Sockets.hzgzlvkc9l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebClient.84i8nwzbgu.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebHeaderCollection.326nl7s9g3.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebProxy.oq3mgkkqef.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.2cx1v74vg8.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.Client.rafzkktw8j.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.w1hpj3bo6r.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.Vectors.oyv7biw9ux.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.lyu36wqn19.wasm +0 -0
- package/learn/vendor/fantomas/System.ObjectModel.kxu80demuu.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.CoreLib.1vy46s12u6.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.DataContractSerialization.ao8k9iu77a.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Uri.itn0n2zjd0.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.19nzpxrx8w.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.Linq.tw5eq1hjvo.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.DispatchProxy.7lajnj8s8c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.7liz9zln06.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.ILGeneration.1ut3qgacw8.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.Lightweight.d0gvllb1jj.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Extensions.zr5bhwfczd.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Metadata.ff6np6mz2j.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Primitives.igpmvwv78c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.TypeExtensions.qouojzlnp9.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.mk3jyxvh13.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Reader.41ppfyz2vc.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.ResourceManager.sfwvfmw1ea.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Writer.3uvs9tp38z.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.Unsafe.puz1xm53oc.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.VisualC.9qdau315py.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Extensions.i7gntui96b.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Handles.00oxj4o6ov.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.JavaScript.9kq1vofond.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.RuntimeInformation.my7qeqbhfh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.vqp80tnwc7.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Intrinsics.u0samjybfo.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Loader.n6zxw1b98a.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Numerics.o40sjhz59x.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Formatters.1esvva4te3.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Json.4n7u09advh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Primitives.xs2bo91wvk.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Xml.ny21jmziti.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.qcxaur5wqs.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.odq454d6j9.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.AccessControl.8yfnzmqzaq.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Claims.8ogy0860de.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Algorithms.8zijp1svfw.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Cng.yxagtt77no.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Csp.uhfbvvau84.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Encoding.2ywrusvy8q.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.OpenSsl.oa268u7i92.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Primitives.5uhvqe8puk.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.X509Certificates.6i7pxilopt.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.d0quqk1iyr.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.Windows.gpqua4rz29.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.i20kfklf3g.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.SecureString.x2y8tzci3c.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.e83vvh6sl2.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceModel.Web.poglliv2no.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceProcess.yro5uj2opo.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.CodePages.2wchx40i7z.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.Extensions.8utaw61kn5.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.cxdyfepnpj.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encodings.Web.37ehbi7cye.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Json.ixiaa8hd3h.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.RegularExpressions.2fhfmkk6vf.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.6pry74a050.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.AccessControl.76zfdfy8go.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Channels.gpxnr01lmp.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Overlapped.aqpl8tzdyc.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Dataflow.ytwttt7fzh.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Extensions.0deavcb00v.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Parallel.tjwtxugso0.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.fu4qd5h3qy.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Thread.klaua2by9m.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.ThreadPool.mkzm212njz.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Timer.yp49llu5h2.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.Local.vz6cgeh4w7.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.ipwm3rsy66.wasm +0 -0
- package/learn/vendor/fantomas/System.ValueTuple.7ol6ljuhx8.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.HttpUtility.itlvncjd96.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.np8uzzakvl.wasm +0 -0
- package/learn/vendor/fantomas/System.Windows.18nzio44t3.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.45jprtg1pa.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Linq.v9v8udncm1.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.ReaderWriter.a9mr08uzci.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Serialization.03juoguwgc.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XDocument.c9dhjnzqjb.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.XDocument.138b12i1pm.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.pvxm9341ce.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlDocument.450wsyxvl0.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlSerializer.y3t2n0tce7.wasm +0 -0
- package/learn/vendor/fantomas/System.gjriafnqmz.wasm +0 -0
- package/learn/vendor/fantomas/WindowsBase.8zsce9qxfb.wasm +0 -0
- package/learn/vendor/fantomas/cs/FSharp.Core.resources.9ehmavdel7.wasm +0 -0
- package/learn/vendor/fantomas/de/FSharp.Core.resources.2ofmxloa01.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.js +1233 -0
- package/learn/vendor/fantomas/dotnet.native.b6l13xorvf.js +16 -0
- package/learn/vendor/fantomas/dotnet.native.rw4kynp763.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.runtime.v06hirbjsv.js +4 -0
- package/learn/vendor/fantomas/es/FSharp.Core.resources.hkr5ggb4tr.wasm +0 -0
- package/learn/vendor/fantomas/fr/FSharp.Core.resources.43soen28ow.wasm +0 -0
- package/learn/vendor/fantomas/icudt_CJK.tjcz0u77k5.dat +0 -0
- package/learn/vendor/fantomas/icudt_EFIGS.tptq2av103.dat +0 -0
- package/learn/vendor/fantomas/icudt_no_CJK.lfu7j35m59.dat +0 -0
- package/learn/vendor/fantomas/it/FSharp.Core.resources.m60n5ls7oq.wasm +0 -0
- package/learn/vendor/fantomas/ja/FSharp.Core.resources.o6oof69v14.wasm +0 -0
- package/learn/vendor/fantomas/ko/FSharp.Core.resources.q6l4snlu9o.wasm +0 -0
- package/learn/vendor/fantomas/mscorlib.8ptuc08eli.wasm +0 -0
- package/learn/vendor/fantomas/netstandard.eymp85mooh.wasm +0 -0
- package/learn/vendor/fantomas/pl/FSharp.Core.resources.8bni0w6j8b.wasm +0 -0
- package/learn/vendor/fantomas/pt-BR/FSharp.Core.resources.k849vqm41u.wasm +0 -0
- package/learn/vendor/fantomas/ru/FSharp.Core.resources.jz9rhhtsla.wasm +0 -0
- package/learn/vendor/fantomas/tr/FSharp.Core.resources.wn6vbvjm1u.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hans/FSharp.Core.resources.z7zzbso094.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hant/FSharp.Core.resources.iammfsi7ls.wasm +0 -0
- package/learn/vendor/fast-check-LICENSE.txt +21 -0
- package/learn/vendor/fast-check.mjs +37 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-600-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-700-normal.woff2 +0 -0
- package/learn/vendor/formatter-licenses/DotNet-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/DotNet-THIRD-PARTY-NOTICES.txt +1418 -0
- package/learn/vendor/formatter-licenses/FSharp-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/Fantomas-LICENSE.txt +202 -0
- package/learn/vendor/formatter-licenses/README.md +12 -0
- package/learn/vendor/manifest.json +1358 -0
- package/learn/vendor/metadata/Browser.Blob.dll +0 -0
- package/learn/vendor/metadata/Browser.Dom.dll +0 -0
- package/learn/vendor/metadata/Browser.Event.dll +0 -0
- package/learn/vendor/metadata/Browser.Gamepad.dll +0 -0
- package/learn/vendor/metadata/Browser.WebGL.dll +0 -0
- package/learn/vendor/metadata/Browser.WebStorage.dll +0 -0
- package/learn/vendor/metadata/FSharp.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Repl.Lib.dll +0 -0
- package/learn/vendor/metadata/System.Collections.Concurrent.dll +0 -0
- package/learn/vendor/metadata/System.Collections.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.TypeConverter.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.dll +0 -0
- package/learn/vendor/metadata/System.Console.dll +0 -0
- package/learn/vendor/metadata/System.Core.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Debug.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tools.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tracing.dll +0 -0
- package/learn/vendor/metadata/System.Globalization.dll +0 -0
- package/learn/vendor/metadata/System.IO.dll +0 -0
- package/learn/vendor/metadata/System.Net.Requests.dll +0 -0
- package/learn/vendor/metadata/System.Net.WebClient.dll +0 -0
- package/learn/vendor/metadata/System.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Metadata.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.TypeExtensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.InteropServices.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.dll +0 -0
- package/learn/vendor/metadata/System.Text.RegularExpressions.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Tasks.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Thread.dll +0 -0
- package/learn/vendor/metadata/System.Threading.dll +0 -0
- package/learn/vendor/metadata/System.ValueTuple.dll +0 -0
- package/learn/vendor/metadata/System.dll +0 -0
- package/learn/vendor/metadata/mscorlib.dll +0 -0
- package/learn/vendor/metadata/netstandard.dll +0 -0
- package/learn/vendor/monaco-editor-LICENSE.txt +21 -0
- package/learn/vendor/prettier/babel.mjs +16 -0
- package/learn/vendor/prettier/brace-style.mjs +376 -0
- package/learn/vendor/prettier/estree.mjs +44 -0
- package/learn/vendor/prettier/standalone.mjs +29 -0
- package/learn/vendor/prettier/typescript.mjs +22 -0
- package/learn/vendor/prettier-LICENSE.txt +7 -0
- package/learn/vendor/prettier-plugin-brace-style-LICENSE.txt +21 -0
- package/learn/vendor/typescript-LICENSE.txt +55 -0
- package/learn/vendor/typescript-libs.json +1 -0
- package/learn/vendor/typescript.mjs +451 -0
- package/learn/vendor/zod-LICENSE.txt +21 -0
- package/learn/web-format.mjs +8 -0
- package/learn.mjs +126 -0
- package/lsp.mjs +10 -5
- package/native-evidence.mjs +50 -15
- package/native-examples.mjs +8 -7
- package/native-host.mjs +71 -0
- package/package.json +10 -4
- package/proof.d.ts +8 -2
- package/proof.mjs +183 -31
- package/scala-build-state.mjs +59 -0
- package/templates.mjs +242 -2
- package/test-command.mjs +192 -60
- package/builtin-data-names.mjs +0 -73
- package/examples/native-payments/clojure/lawspec.json +0 -62
- package/examples/native-payments/csharp/lawspec.json +0 -62
- package/examples/native-payments/elixir/lawspec.json +0 -160
- package/examples/native-payments/erlang/lawspec.json +0 -159
- package/examples/native-payments/fsharp/lawspec.json +0 -178
- package/examples/native-payments/gleam/lawspec.json +0 -160
- package/examples/native-payments/go/lawspec.json +0 -147
- package/examples/native-payments/groovy/lawspec.json +0 -176
- package/examples/native-payments/haskell/lawspec.json +0 -160
- package/examples/native-payments/java/lawspec.json +0 -176
- package/examples/native-payments/javascript/lawspec.json +0 -160
- package/examples/native-payments/kotlin/lawspec.json +0 -176
- package/examples/native-payments/prolog/lawspec.json +0 -20
- package/examples/native-payments/python/lawspec.json +0 -160
- package/examples/native-payments/rust/lawspec.json +0 -178
- package/examples/native-payments/scala/lawspec.json +0 -176
- package/examples/native-payments/swift/lawspec.json +0 -165
- package/examples/native-payments/typescript/lawspec.json +0 -160
- package/examples/packages/orders/lawspec.json +0 -27
- package/examples/packages/shop-domain/lawspec-package.json +0 -7
- package/examples/packages/shop-tax-1/lawspec-package.json +0 -5
- package/examples/packages/shop-tax-2/lawspec-package.json +0 -5
- package/explain.mjs +0 -114
- package/expression-presentation.mjs +0 -333
- package/positional-fields.mjs +0 -13
- package/typed-presentation.mjs +0 -165
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"sources": [
|
|
4
|
-
"laws"
|
|
5
|
-
],
|
|
6
|
-
"machineBits": 64,
|
|
7
|
-
"targets": [
|
|
8
|
-
{
|
|
9
|
-
"language": "scala",
|
|
10
|
-
"root": ".",
|
|
11
|
-
"nativeBindings": {
|
|
12
|
-
"types": [
|
|
13
|
-
{
|
|
14
|
-
"type": "example.payments::type::Currency",
|
|
15
|
-
"native": [
|
|
16
|
-
"domain",
|
|
17
|
-
"PaymentsDomain",
|
|
18
|
-
"CurrencyCode"
|
|
19
|
-
],
|
|
20
|
-
"constructors": [
|
|
21
|
-
{
|
|
22
|
-
"constructor": "USD",
|
|
23
|
-
"native": [
|
|
24
|
-
"domain",
|
|
25
|
-
"PaymentsDomain",
|
|
26
|
-
"CurrencyCode",
|
|
27
|
-
"Dollars"
|
|
28
|
-
],
|
|
29
|
-
"style": "unit",
|
|
30
|
-
"fields": []
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"constructor": "EUR",
|
|
34
|
-
"native": [
|
|
35
|
-
"domain",
|
|
36
|
-
"PaymentsDomain",
|
|
37
|
-
"CurrencyCode",
|
|
38
|
-
"Euros"
|
|
39
|
-
],
|
|
40
|
-
"style": "unit",
|
|
41
|
-
"fields": []
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"constructor": "GBP",
|
|
45
|
-
"native": [
|
|
46
|
-
"domain",
|
|
47
|
-
"PaymentsDomain",
|
|
48
|
-
"CurrencyCode",
|
|
49
|
-
"Pounds"
|
|
50
|
-
],
|
|
51
|
-
"style": "unit",
|
|
52
|
-
"fields": []
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "example.payments::type::Money",
|
|
58
|
-
"native": [
|
|
59
|
-
"domain",
|
|
60
|
-
"PaymentsDomain",
|
|
61
|
-
"Price"
|
|
62
|
-
],
|
|
63
|
-
"constructors": [
|
|
64
|
-
{
|
|
65
|
-
"constructor": "Money",
|
|
66
|
-
"native": [
|
|
67
|
-
"domain",
|
|
68
|
-
"PaymentsDomain",
|
|
69
|
-
"Price"
|
|
70
|
-
],
|
|
71
|
-
"style": "record",
|
|
72
|
-
"fields": [
|
|
73
|
-
{
|
|
74
|
-
"field": "amount",
|
|
75
|
-
"native": "major"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"field": "currency",
|
|
79
|
-
"native": "unit"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "example.payments::type::Payment",
|
|
87
|
-
"native": [
|
|
88
|
-
"domain",
|
|
89
|
-
"PaymentsDomain",
|
|
90
|
-
"PaymentStatus"
|
|
91
|
-
],
|
|
92
|
-
"constructors": [
|
|
93
|
-
{
|
|
94
|
-
"constructor": "Paid",
|
|
95
|
-
"native": [
|
|
96
|
-
"domain",
|
|
97
|
-
"PaymentsDomain",
|
|
98
|
-
"Settled"
|
|
99
|
-
],
|
|
100
|
-
"style": "variant",
|
|
101
|
-
"fields": [
|
|
102
|
-
{
|
|
103
|
-
"field": "value",
|
|
104
|
-
"native": "price"
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"constructor": "Declined",
|
|
110
|
-
"native": [
|
|
111
|
-
"domain",
|
|
112
|
-
"PaymentsDomain",
|
|
113
|
-
"Rejected"
|
|
114
|
-
],
|
|
115
|
-
"style": "variant",
|
|
116
|
-
"fields": [
|
|
117
|
-
{
|
|
118
|
-
"field": "value",
|
|
119
|
-
"native": "explanation"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"functions": [
|
|
127
|
-
{
|
|
128
|
-
"declaration": "example.payments::addFee",
|
|
129
|
-
"native": [
|
|
130
|
-
"domain",
|
|
131
|
-
"PaymentsDomain",
|
|
132
|
-
"apply_fee"
|
|
133
|
-
]
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"declaration": "example.payments::roundTrip",
|
|
137
|
-
"native": [
|
|
138
|
-
"domain",
|
|
139
|
-
"PaymentsDomain",
|
|
140
|
-
"restore"
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"declaration": "example.payments::archive",
|
|
145
|
-
"native": [
|
|
146
|
-
"domain",
|
|
147
|
-
"PaymentsDomain",
|
|
148
|
-
"store"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
"generators": [
|
|
153
|
-
{
|
|
154
|
-
"type": "example.payments::type::Money",
|
|
155
|
-
"factory": [
|
|
156
|
-
"domain",
|
|
157
|
-
"PaymentGenerators",
|
|
158
|
-
"prices"
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
],
|
|
165
|
-
"languageProfile": "1.0-rc.2",
|
|
166
|
-
"verification": {
|
|
167
|
-
"layers": [
|
|
168
|
-
"proof",
|
|
169
|
-
"exhaustive",
|
|
170
|
-
"property",
|
|
171
|
-
"examples",
|
|
172
|
-
"runtime",
|
|
173
|
-
"model"
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"sources": [
|
|
4
|
-
"laws"
|
|
5
|
-
],
|
|
6
|
-
"machineBits": 64,
|
|
7
|
-
"targets": [
|
|
8
|
-
{
|
|
9
|
-
"language": "swift",
|
|
10
|
-
"root": ".",
|
|
11
|
-
"nativeBindings": {
|
|
12
|
-
"types": [
|
|
13
|
-
{
|
|
14
|
-
"type": "example.payments::type::Currency",
|
|
15
|
-
"native": [
|
|
16
|
-
"PaymentsDomain",
|
|
17
|
-
"CurrencyCode"
|
|
18
|
-
],
|
|
19
|
-
"constructors": [
|
|
20
|
-
{
|
|
21
|
-
"constructor": "USD",
|
|
22
|
-
"native": [
|
|
23
|
-
"PaymentsDomain",
|
|
24
|
-
"CurrencyCode",
|
|
25
|
-
"dollars"
|
|
26
|
-
],
|
|
27
|
-
"style": "unit",
|
|
28
|
-
"fields": []
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"constructor": "EUR",
|
|
32
|
-
"native": [
|
|
33
|
-
"PaymentsDomain",
|
|
34
|
-
"CurrencyCode",
|
|
35
|
-
"euros"
|
|
36
|
-
],
|
|
37
|
-
"style": "unit",
|
|
38
|
-
"fields": []
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"constructor": "GBP",
|
|
42
|
-
"native": [
|
|
43
|
-
"PaymentsDomain",
|
|
44
|
-
"CurrencyCode",
|
|
45
|
-
"pounds"
|
|
46
|
-
],
|
|
47
|
-
"style": "unit",
|
|
48
|
-
"fields": []
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"type": "example.payments::type::Money",
|
|
54
|
-
"native": [
|
|
55
|
-
"PaymentsDomain",
|
|
56
|
-
"Price"
|
|
57
|
-
],
|
|
58
|
-
"constructors": [
|
|
59
|
-
{
|
|
60
|
-
"constructor": "Money",
|
|
61
|
-
"native": [
|
|
62
|
-
"PaymentsDomain",
|
|
63
|
-
"Price"
|
|
64
|
-
],
|
|
65
|
-
"style": "record",
|
|
66
|
-
"fields": [
|
|
67
|
-
{
|
|
68
|
-
"field": "amount",
|
|
69
|
-
"native": "major"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"field": "currency",
|
|
73
|
-
"native": "unit"
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"type": "example.payments::type::Payment",
|
|
81
|
-
"native": [
|
|
82
|
-
"PaymentsDomain",
|
|
83
|
-
"PaymentStatus"
|
|
84
|
-
],
|
|
85
|
-
"constructors": [
|
|
86
|
-
{
|
|
87
|
-
"constructor": "Paid",
|
|
88
|
-
"native": [
|
|
89
|
-
"PaymentsDomain",
|
|
90
|
-
"PaymentStatus",
|
|
91
|
-
"settled"
|
|
92
|
-
],
|
|
93
|
-
"style": "variant",
|
|
94
|
-
"fields": [
|
|
95
|
-
{
|
|
96
|
-
"field": "value",
|
|
97
|
-
"native": "price"
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"constructor": "Declined",
|
|
103
|
-
"native": [
|
|
104
|
-
"PaymentsDomain",
|
|
105
|
-
"PaymentStatus",
|
|
106
|
-
"rejected"
|
|
107
|
-
],
|
|
108
|
-
"style": "variant",
|
|
109
|
-
"fields": [
|
|
110
|
-
{
|
|
111
|
-
"field": "value",
|
|
112
|
-
"native": "explanation"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
"functions": [
|
|
120
|
-
{
|
|
121
|
-
"declaration": "example.payments::addFee",
|
|
122
|
-
"native": [
|
|
123
|
-
"PaymentsDomain",
|
|
124
|
-
"applyFee"
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"declaration": "example.payments::roundTrip",
|
|
129
|
-
"native": [
|
|
130
|
-
"PaymentsDomain",
|
|
131
|
-
"restore"
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"declaration": "example.payments::archive",
|
|
136
|
-
"native": [
|
|
137
|
-
"PaymentsDomain",
|
|
138
|
-
"store"
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"generators": [
|
|
143
|
-
{
|
|
144
|
-
"type": "example.payments::type::Money",
|
|
145
|
-
"factory": [
|
|
146
|
-
"PaymentGenerators",
|
|
147
|
-
"prices"
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"languageProfile": "1.0-rc.2",
|
|
155
|
-
"verification": {
|
|
156
|
-
"layers": [
|
|
157
|
-
"proof",
|
|
158
|
-
"exhaustive",
|
|
159
|
-
"property",
|
|
160
|
-
"examples",
|
|
161
|
-
"runtime",
|
|
162
|
-
"model"
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"sources": [
|
|
4
|
-
"laws"
|
|
5
|
-
],
|
|
6
|
-
"machineBits": 64,
|
|
7
|
-
"targets": [
|
|
8
|
-
{
|
|
9
|
-
"language": "typescript",
|
|
10
|
-
"root": ".",
|
|
11
|
-
"nativeBindings": {
|
|
12
|
-
"types": [
|
|
13
|
-
{
|
|
14
|
-
"type": "example.payments::type::Currency",
|
|
15
|
-
"native": [
|
|
16
|
-
"payments_domain",
|
|
17
|
-
"CurrencyCode"
|
|
18
|
-
],
|
|
19
|
-
"constructors": [
|
|
20
|
-
{
|
|
21
|
-
"constructor": "USD",
|
|
22
|
-
"native": [
|
|
23
|
-
"payments_domain",
|
|
24
|
-
"Dollars"
|
|
25
|
-
],
|
|
26
|
-
"style": "unit",
|
|
27
|
-
"fields": []
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"constructor": "EUR",
|
|
31
|
-
"native": [
|
|
32
|
-
"payments_domain",
|
|
33
|
-
"Euros"
|
|
34
|
-
],
|
|
35
|
-
"style": "unit",
|
|
36
|
-
"fields": []
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"constructor": "GBP",
|
|
40
|
-
"native": [
|
|
41
|
-
"payments_domain",
|
|
42
|
-
"Pounds"
|
|
43
|
-
],
|
|
44
|
-
"style": "unit",
|
|
45
|
-
"fields": []
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "example.payments::type::Money",
|
|
51
|
-
"native": [
|
|
52
|
-
"payments_domain",
|
|
53
|
-
"Price"
|
|
54
|
-
],
|
|
55
|
-
"constructors": [
|
|
56
|
-
{
|
|
57
|
-
"constructor": "Money",
|
|
58
|
-
"native": [
|
|
59
|
-
"payments_domain",
|
|
60
|
-
"Price"
|
|
61
|
-
],
|
|
62
|
-
"style": "record",
|
|
63
|
-
"fields": [
|
|
64
|
-
{
|
|
65
|
-
"field": "amount",
|
|
66
|
-
"native": "major"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"field": "currency",
|
|
70
|
-
"native": "unit"
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"type": "example.payments::type::Payment",
|
|
78
|
-
"native": [
|
|
79
|
-
"payments_domain",
|
|
80
|
-
"PaymentStatus"
|
|
81
|
-
],
|
|
82
|
-
"constructors": [
|
|
83
|
-
{
|
|
84
|
-
"constructor": "Paid",
|
|
85
|
-
"native": [
|
|
86
|
-
"payments_domain",
|
|
87
|
-
"Settled"
|
|
88
|
-
],
|
|
89
|
-
"style": "variant",
|
|
90
|
-
"fields": [
|
|
91
|
-
{
|
|
92
|
-
"field": "value",
|
|
93
|
-
"native": "price"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"constructor": "Declined",
|
|
99
|
-
"native": [
|
|
100
|
-
"payments_domain",
|
|
101
|
-
"Rejected"
|
|
102
|
-
],
|
|
103
|
-
"style": "variant",
|
|
104
|
-
"fields": [
|
|
105
|
-
{
|
|
106
|
-
"field": "value",
|
|
107
|
-
"native": "explanation"
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"functions": [
|
|
115
|
-
{
|
|
116
|
-
"declaration": "example.payments::addFee",
|
|
117
|
-
"native": [
|
|
118
|
-
"payments_domain",
|
|
119
|
-
"apply_fee"
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"declaration": "example.payments::roundTrip",
|
|
124
|
-
"native": [
|
|
125
|
-
"payments_domain",
|
|
126
|
-
"restore"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"declaration": "example.payments::archive",
|
|
131
|
-
"native": [
|
|
132
|
-
"payments_domain",
|
|
133
|
-
"store"
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"generators": [
|
|
138
|
-
{
|
|
139
|
-
"type": "example.payments::type::Money",
|
|
140
|
-
"factory": [
|
|
141
|
-
"lawspec_generators",
|
|
142
|
-
"prices"
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"languageProfile": "1.0-rc.2",
|
|
150
|
-
"verification": {
|
|
151
|
-
"layers": [
|
|
152
|
-
"proof",
|
|
153
|
-
"exhaustive",
|
|
154
|
-
"property",
|
|
155
|
-
"examples",
|
|
156
|
-
"runtime",
|
|
157
|
-
"model"
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"sources": [
|
|
4
|
-
"orders.lawspec"
|
|
5
|
-
],
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"shop.domain": "^1.0.0",
|
|
8
|
-
"shop.tax": "^2.0.0"
|
|
9
|
-
},
|
|
10
|
-
"packages": [
|
|
11
|
-
"../shop-domain",
|
|
12
|
-
"../shop-tax-1",
|
|
13
|
-
"../shop-tax-2"
|
|
14
|
-
],
|
|
15
|
-
"targets": [],
|
|
16
|
-
"languageProfile": "1.0-rc.2",
|
|
17
|
-
"verification": {
|
|
18
|
-
"layers": [
|
|
19
|
-
"proof",
|
|
20
|
-
"exhaustive",
|
|
21
|
-
"property",
|
|
22
|
-
"examples",
|
|
23
|
-
"runtime",
|
|
24
|
-
"model"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
}
|
package/explain.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// Generated from templates/npm/explain.mjs by lawspec-dev generate. Do not edit.
|
|
2
|
-
// All presentations read the same typed law and its evidence. No view parses
|
|
3
|
-
// business wording or changes an obligation.
|
|
4
|
-
import { createTypePresentation } from './typed-presentation.mjs';
|
|
5
|
-
|
|
6
|
-
export const explanationViews = ['developer', 'business', 'formal', 'evidence'];
|
|
7
|
-
const exampleName = name => name.startsWith('"|') && name.endsWith('|') ? name
|
|
8
|
-
: '"|' + name.replace(/\\/gu, '\\\\').replace(/\|/gu, '\\|') + '|';
|
|
9
|
-
const presentationProposition = ({ typeName, expressionText }, inputs) => function proposition(assertion, business = false, scope = inputs) {
|
|
10
|
-
const term = expression => expressionText(expression, scope);
|
|
11
|
-
const recurse = (body, wording = business) => proposition(body, wording, scope);
|
|
12
|
-
switch (assertion.kind) {
|
|
13
|
-
case 'equal': return `${term(assertion.left)} ${business ? 'must be' : '='} ${term(assertion.right)}`;
|
|
14
|
-
case 'implies': return business
|
|
15
|
-
? `If ${term(assertion.guard)}, then ${recurse(assertion.body, true)}`
|
|
16
|
-
: `(${term(assertion.guard)}) implies (${recurse(assertion.body)})`;
|
|
17
|
-
case 'all': return assertion.items.map(a => `(${recurse(a)})`).join(' and ');
|
|
18
|
-
case 'not': {
|
|
19
|
-
// The compiler's ordinary negation/conjunction representation also
|
|
20
|
-
// expresses disjunction and implications with proposition premises.
|
|
21
|
-
const items = assertion.body.kind === 'all' ? assertion.body.items : [];
|
|
22
|
-
if (items.length > 1 && items.every(item => item.kind === 'not'))
|
|
23
|
-
return items.map(item => `(${recurse(item.body)})`).join(' or ');
|
|
24
|
-
if (items.length === 2 && items[1].kind === 'not') return business
|
|
25
|
-
? `If (${recurse(items[0], true)}), then (${recurse(items[1].body, true)})`
|
|
26
|
-
: `(${recurse(items[0])}) implies (${recurse(items[1].body)})`;
|
|
27
|
-
return business && assertion.body.kind === 'exists'
|
|
28
|
-
? recurse(assertion.body, true).replace(/^There must exist/, 'There must not exist')
|
|
29
|
-
: `${business ? 'Must not' : 'not'} (${recurse(assertion.body, false)})`;
|
|
30
|
-
}
|
|
31
|
-
case 'forall':
|
|
32
|
-
case 'exists': {
|
|
33
|
-
const universal = assertion.kind === 'forall';
|
|
34
|
-
const binder = `${assertion.binder.name} of type ${typeName(assertion.binder.type)}`;
|
|
35
|
-
const nested = new Map([...scope, [assertion.binder.id, assertion.binder.name]]);
|
|
36
|
-
const restrictions = assertion.predicates.map(p => expressionText(p, nested));
|
|
37
|
-
const restricted = restrictions.length ? ` where ${restrictions.join(' and ')}` : '';
|
|
38
|
-
if (business) return `${universal ? 'For every' : 'There must exist'} ${binder}${restricted}, ${proposition(assertion.body, true, nested)}`;
|
|
39
|
-
return `${universal ? 'for all' : 'there exists'} (${binder}${restricted}) ${universal ? '=>' : 'such that'}\n${proposition(assertion.body, false, nested)}\nend ${universal ? 'for all' : 'exists'}`;
|
|
40
|
-
}
|
|
41
|
-
default: throw new Error(`Unsupported typed assertion ${assertion.kind}`);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
export function explainLaw(law, result, view = 'developer') {
|
|
45
|
-
if (!explanationViews.includes(view)) throw new Error(`Choose --view ${explanationViews.join('|')}`);
|
|
46
|
-
const presentation = createTypePresentation(result);
|
|
47
|
-
const { typeName, expressionText, valueText } = presentation;
|
|
48
|
-
const examples = law.examples ?? [];
|
|
49
|
-
const scope = new Map(law.inputs.map(input => [input.id, input.name]));
|
|
50
|
-
const proposition = presentationProposition(presentation, scope);
|
|
51
|
-
const evidence = (result.evidence ?? []).filter(e => e.declaration === law.id);
|
|
52
|
-
const quantifiers = law.inputs.map(input => `${input.name} of type ${typeName(input.type)}`);
|
|
53
|
-
const restrictions = law.inputs.flatMap(input => input.predicates.map(p => expressionText(p, scope)));
|
|
54
|
-
const metadata = law.metadata ?? {};
|
|
55
|
-
const references = law.references ?? [];
|
|
56
|
-
const witnesses = law.harness?.witnesses ?? [];
|
|
57
|
-
const searches = law.harness?.searches ?? [];
|
|
58
|
-
const strategies = [
|
|
59
|
-
...witnesses.map(witness => `Configured witness (not completed evidence): definition.${witness.path.join('.')} = ${expressionText(witness.expression, scope)}`),
|
|
60
|
-
...searches.map(search => `Configured search (not completed evidence): definition.${search.path.join('.')} uses ${search.strategy}`),
|
|
61
|
-
];
|
|
62
|
-
const documentary = [metadata.id === undefined ? '' : `Requirement: ${metadata.id}`,
|
|
63
|
-
metadata.owner === undefined ? '' : `Owner: ${metadata.owner}`,
|
|
64
|
-
...references.map(reference => `Reference: ${referenceText(reference)}`)].filter(Boolean);
|
|
65
|
-
let text;
|
|
66
|
-
if (view === 'evidence') text = evidence.length
|
|
67
|
-
? evidence.map(e => `${e.status.toUpperCase()}: ${e.reason}`+(e.nativeEvidence?'\n'+nativeEvidenceText(e):'')).join('\n')
|
|
68
|
-
: 'No completed evidence has been supplied for this law.';
|
|
69
|
-
else if (view === 'business') text = [...documentary, law.description,
|
|
70
|
-
quantifiers.length ? `For every ${quantifiers.join(' and ')}` : '',
|
|
71
|
-
restrictions.length ? `When ${restrictions.join(' and ')}` : '',
|
|
72
|
-
proposition(law.assertion, true), law.rationale ? `Reason: ${law.rationale}` : ''].filter(Boolean).join('\n');
|
|
73
|
-
else if (view === 'formal') text = [quantifiers.length ? `for all (${quantifiers.join(') (')}) =>` : '',
|
|
74
|
-
restrictions.length ? `(${restrictions.join(' and ')}) implies` : '',
|
|
75
|
-
proposition(law.assertion), ...(quantifiers.length ? ['end for all'] : [])].filter(Boolean).join('\n');
|
|
76
|
-
else text = [law.id, ...documentary, ...law.trace, ...strategies,
|
|
77
|
-
...(quantifiers.length ? [`Inputs: ${quantifiers.join('; ')}`] : []),
|
|
78
|
-
...(restrictions.length ? [`Restrictions: ${restrictions.join(' and ')}`] : []), proposition(law.assertion),
|
|
79
|
-
`Source: ${law.location.file}:${law.location.line}:${law.location.column}`,
|
|
80
|
-
`Examples: ${examples.length}`,
|
|
81
|
-
...examples.flatMap(example => {
|
|
82
|
-
const locals = new Map([...scope, ...example.bindings.map(binding => [binding.id, binding.name])]);
|
|
83
|
-
return [`example ${exampleName(example.name)}:`,
|
|
84
|
-
...example.bindings.map(binding => ` ${binding.name} = ${valueText(binding.value, locals)}`),
|
|
85
|
-
...example.expectations.map(expectation => ` expect ${proposition(expectation, false, locals)}`), 'end example'];
|
|
86
|
-
})].join('\n');
|
|
87
|
-
if(view==='developer')for(const item of evidence)if(item.nativeEvidence)text+='\n'+nativeEvidenceText(item);
|
|
88
|
-
if (view === 'evidence' && strategies.length) text += '\n' + strategies.join('\n');
|
|
89
|
-
return { view, law: law.id, metadata, references, witnesses, searches, examples, inputs: law.inputs, assertion: law.assertion, evidence, text };
|
|
90
|
-
}
|
|
91
|
-
function referenceText(reference) {
|
|
92
|
-
if (typeof reference === 'string') return reference;
|
|
93
|
-
if (reference.kind === 'external') return `${reference.name ? `${reference.name}: ` : ''}${reference.resource}`;
|
|
94
|
-
const selector = reference.selector;
|
|
95
|
-
const section = selector?.kind === 'named-reference' ? ` references.${selector.name}` : selector ? ` ${selector.kind}` : '';
|
|
96
|
-
const raw = reference.target.name;
|
|
97
|
-
// Built-in laws retain legacy source names internally; present their
|
|
98
|
-
// canonical phrase spelling just as ordinary authored names are presented.
|
|
99
|
-
const name = raw.startsWith('"|') || /^\p{L}[\p{L}\p{N}_]*$/u.test(raw)
|
|
100
|
-
? raw : `"|${raw.replace(/[\\|]/g, '\\$&')}|`;
|
|
101
|
-
return `ref ${reference.kind} ${reference.target.unit}.${name}${section}`;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function nativeEvidenceText(item){
|
|
105
|
-
if(!item.nativeEvidence)return '';
|
|
106
|
-
const summary=item.nativeEvidence;
|
|
107
|
-
return [`Native conformance: ${summary.status}; search completeness: ${summary.searchCompleteness}`,
|
|
108
|
-
...summary.observations.map(row=>`${row.target} (${row.root}): ${row.outcome}; ${row.freshness}`+
|
|
109
|
-
(row.attempt?`; seed ${row.attempt.seed}; ${row.attempt.at}`:'')+`; ${row.reason}`),
|
|
110
|
-
...summary.observations.flatMap(row=>(row.attempt?.tests??[]).filter(test=>test.status==='failed')
|
|
111
|
-
.map(test=>`${test.name}: ${test.reason??test.failure??test.message??'native test failed'}`)),
|
|
112
|
-
...summary.observations.filter(row=>row.attempt?.invocation.output)
|
|
113
|
-
.map(row=>'Native invocation output (scoped to that invocation):\n'+row.attempt.invocation.output)].join('\n');
|
|
114
|
-
}
|