lawspec 0.31.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 +29 -1
- package/README.md +10 -4
- package/bin/lawspec.mjs +13 -3
- package/build.json +9 -9
- package/core.wasm +2 -2
- package/core_jsffi.js +5 -5
- 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/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.31.1] - 2026-10-29
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `lawspec learn` serves the packaged F#-first learning track without a project
|
|
14
|
+
manifest. Six executable lessons pair worked examples with practice in F#,
|
|
15
|
+
TypeScript or JavaScript, covering examples, property selection, generators,
|
|
16
|
+
shrinking, replay and kept regression cases. The same artifact replaces the
|
|
17
|
+
previous coffee-order tutorial on GoForge. Teaching review remains open;
|
|
18
|
+
later lessons, capstones and the complete API collection remain deferred.
|
|
19
|
+
- The browser workspace includes independent Laws, Solution and Harness tabs,
|
|
20
|
+
local formatting and execution, progressive hints, complete solutions,
|
|
21
|
+
autosaved drafts and progress backup/restore. F# executes through Fable and
|
|
22
|
+
the JavaScript harness with fast-check, separately from native .NET/FsCheck.
|
|
23
|
+
Samples, mandatory definition checks, missing results and execution failures
|
|
24
|
+
retain their own meanings; saved progress is not proof.
|
|
25
|
+
- A portable LawSpec tutor skill shares the generated course and executable
|
|
26
|
+
projects with the browser app.
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Quantified-claim formatting uses parsed header, body and closing boundaries,
|
|
30
|
+
keeping short arithmetic bodies together and long binders intact. Formatting
|
|
31
|
+
before a learning run saves and executes the same complete project snapshot.
|
|
32
|
+
- The local Learn server serves JavaScript modules with the correct MIME type,
|
|
33
|
+
including the compiler's JavaScript glue, and packages all required browser
|
|
34
|
+
compiler, editor, formatter, runtime and font assets for local execution.
|
|
35
|
+
|
|
9
36
|
## [0.31.0] - 2026-10-26
|
|
10
37
|
|
|
11
38
|
### Fixed
|
|
@@ -2348,7 +2375,8 @@ A maintenance release. The language, generated code and API are unchanged from
|
|
|
2348
2375
|
machine-sized bindings reject an architecture mismatch. Rust adapters take
|
|
2349
2376
|
owned values.
|
|
2350
2377
|
|
|
2351
|
-
[Unreleased]: https://github.com/brain-fuel/lawspec/compare/v0.31.
|
|
2378
|
+
[Unreleased]: https://github.com/brain-fuel/lawspec/compare/v0.31.1...HEAD
|
|
2379
|
+
[0.31.1]: https://github.com/brain-fuel/lawspec/compare/v0.31.0...v0.31.1
|
|
2352
2380
|
[0.31.0]: https://github.com/brain-fuel/lawspec/compare/v0.30.0...v0.31.0
|
|
2353
2381
|
[0.30.0]: https://github.com/brain-fuel/lawspec/compare/v0.29.2...v0.30.0
|
|
2354
2382
|
[0.29.2]: https://github.com/brain-fuel/lawspec/compare/v0.29.1...v0.29.2
|
package/README.md
CHANGED
|
@@ -9,10 +9,7 @@ Haskell, Kotlin, Rust, C#, F#, Swift, Erlang, Elixir, Gleam, Clojure, Groovy and
|
|
|
9
9
|
Scala. The compiler is written in Haskell and distributed on npm as prebuilt
|
|
10
10
|
WebAssembly, with a Node CLI and a typed JavaScript API.
|
|
11
11
|
|
|
12
|
-
The
|
|
13
|
-
on `main`.
|
|
14
|
-
Install the development checkout as shown below. For released 0.24.0, use the
|
|
15
|
-
[0.24.0 documentation](https://github.com/brain-fuel/lawspec/tree/v0.24.0).
|
|
12
|
+
The npm package includes the compiler and learning track; no Haskell installation is needed.
|
|
16
13
|
|
|
17
14
|
## Features
|
|
18
15
|
|
|
@@ -142,3 +139,12 @@ Syntax highlighting is available as a [VS Code extension](editors/vscode/README.
|
|
|
142
139
|
## License
|
|
143
140
|
|
|
144
141
|
MIT. See [LICENSE](LICENSE).
|
|
142
|
+
|
|
143
|
+
## Learn LawSpec
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
npm install --global lawspec@0.31.1
|
|
147
|
+
lawspec learn
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Open the printed loopback URL, or use [Learn on GoForge](https://goforge.dev/lawspec/learn/). Six lessons pair worked examples with practice in F#, TypeScript or JavaScript. The course is a teaching preview; later lessons, capstones and the complete API collection remain deferred. See [Learn LawSpec](docs/how-to/learn.md).
|
package/bin/lawspec.mjs
CHANGED
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
safePath,
|
|
29
29
|
collectSources,
|
|
30
30
|
} from "../files.mjs";
|
|
31
|
-
const VERSION = "0.31.
|
|
31
|
+
const VERSION = "0.31.1";
|
|
32
32
|
const args = process.argv.slice(2);
|
|
33
33
|
const verb = args.shift();
|
|
34
34
|
const options = {};
|
|
35
35
|
const positional = [];
|
|
36
36
|
for (let i = 0; i < args.length; i++) {
|
|
37
37
|
const arg = args[i];
|
|
38
|
-
if (["--target", "--project", "--config", "--output", "--machine-bits", "--example", "--seed", "--report", "--attestation", "--view", "--solver", "--proof-timeout", "--proof-memory", "--proof-rlimit", "--proof-seed"].includes(arg)) {
|
|
38
|
+
if (["--port", "--target", "--project", "--config", "--output", "--machine-bits", "--example", "--seed", "--report", "--attestation", "--view", "--solver", "--proof-timeout", "--proof-memory", "--proof-rlimit", "--proof-seed"].includes(arg)) {
|
|
39
39
|
if (!args[i + 1] || args[i + 1].startsWith("--"))
|
|
40
40
|
throw new Error(`Missing value for ${arg}`);
|
|
41
41
|
options[arg.slice(2)] = args[++i];
|
|
@@ -759,7 +759,7 @@ async function main() {
|
|
|
759
759
|
}
|
|
760
760
|
if (!verb || ["help", "--help", "-h"].includes(verb)) {
|
|
761
761
|
output(
|
|
762
|
-
"LawSpec " + VERSION + "\nUsage: lawspec init --target <language> [--project <directory>] [--minify]\n lawspec fmt [paths...] [--check] [--compile]\n lawspec lsp --stdio\n lawspec prove [--solver <z3-executable>] [--proof-timeout <ms>] [--json]\n lawspec check [--warn-matches] | doctor | explain [<unit>::<law>] [--view eng|math|dev] | generate\n lawspec evidence [<unit> | <unit>::<declaration>] [--attestation <file>]\n lawspec test [--target <language>] [--fresh] [--seed <n>] [--attestation <file>] [--update-recorded] [--tag <t>] [--exclude-tag <t>] [--report junit=<path>] [--coverage] [--benchmarks]\n lawspec describe --json\n lawspec fetch | update [<package>]\n lawspec package [--project <package directory>] [--output <archive.tgz>]\n lawspec examples [--example payments] [--target <language>] [--output <directory>]\nOptions: --config <path>, --target <language>, --machine-bits <32|64>, --json, --no-cache, --locked, --offline\nGeneration: --dry-run, --check, --minify\nTargets: " +
|
|
762
|
+
"LawSpec " + VERSION + "\nUsage: lawspec learn [--port <port>]\n lawspec init --target <language> [--project <directory>] [--minify]\n lawspec fmt [paths...] [--check] [--compile]\n lawspec lsp --stdio\n lawspec prove [--solver <z3-executable>] [--proof-timeout <ms>] [--json]\n lawspec check [--warn-matches] | doctor | explain [<unit>::<law>] [--view eng|math|dev] | generate\n lawspec evidence [<unit> | <unit>::<declaration>] [--attestation <file>]\n lawspec test [--target <language>] [--fresh] [--seed <n>] [--attestation <file>] [--update-recorded] [--tag <t>] [--exclude-tag <t>] [--report junit=<path>] [--coverage] [--benchmarks]\n lawspec describe --json\n lawspec fetch | update [<package>]\n lawspec package [--project <package directory>] [--output <archive.tgz>]\n lawspec examples [--example payments] [--target <language>] [--output <directory>]\nOptions: --config <path>, --target <language>, --machine-bits <32|64>, --json, --no-cache, --locked, --offline\nGeneration: --dry-run, --check, --minify\nTargets: " +
|
|
763
763
|
targets.join(", "),
|
|
764
764
|
);
|
|
765
765
|
return;
|
|
@@ -768,6 +768,16 @@ async function main() {
|
|
|
768
768
|
output(VERSION);
|
|
769
769
|
return;
|
|
770
770
|
}
|
|
771
|
+
if (verb === 'learn')
|
|
772
|
+
{
|
|
773
|
+
if (positional.length || Object.keys(options).some(key => key !== 'port'))
|
|
774
|
+
{
|
|
775
|
+
throw new Error('learn supports --port only');
|
|
776
|
+
}
|
|
777
|
+
const {serveLearn} = await import('../learn.mjs');
|
|
778
|
+
return serveLearn(options.port ?? '8384');
|
|
779
|
+
}
|
|
780
|
+
if (options.port) throw new Error('--port applies to learn');
|
|
771
781
|
if (options.compile && verb !== "fmt") throw new Error("--compile applies to fmt");
|
|
772
782
|
if (verb !== "fmt" && positional.length > (["explain", "evidence", "update"].includes(verb) ? 1 : 0))
|
|
773
783
|
throw new Error(`Unexpected argument: ${positional.join(" ")}`);
|
package/build.json
CHANGED
|
@@ -560,8 +560,8 @@
|
|
|
560
560
|
],
|
|
561
561
|
"digests": {
|
|
562
562
|
"dev/Gen/Embed.hs": "59a74f00b3e6941c732a14f56dc0769e1673a5e82ea9a30a4a17a952827e1387",
|
|
563
|
-
"lawspec.cabal": "
|
|
564
|
-
"package.yaml": "
|
|
563
|
+
"lawspec.cabal": "9581a04e22fd6c5dbe80f10fcde4ea4a8dffdaa3e47d148b2fc5c11cb2e689f9",
|
|
564
|
+
"package.yaml": "217656bcc6fc1864feda6a9e67c3bb38aa292457ad8e4b65e4c4e9e9301b4cb3",
|
|
565
565
|
"runtime/LawSpecCodecs.hs": "7f5c4b13484aed6074adbe8bcfc190980d7bf517f22e2e3b52a51994a5cc159b",
|
|
566
566
|
"runtime/LawSpecCollectionCodecs.hs": "12a4341bcdaee52434e37332dcd07e2b1806fe93e0cae7306367b0cd4f41e207",
|
|
567
567
|
"runtime/LawSpecDataStrategies.hs": "6bfe43df3a6290e4a94c1b331bd316891f3b9dca6693921ae6cdce9ede4c269a",
|
|
@@ -777,8 +777,8 @@
|
|
|
777
777
|
"runtime/lawspec_schema.mjs": "d8c9da46786a55d10d44c8a6b13b3bb82f583b9a364039cd03d50e55123aa32d",
|
|
778
778
|
"runtime/lawspec_schema.py": "f3f1af6383d5d03dc0e306edd3f03a52dc150a39a3b6c2ffa75f0116825fb52b",
|
|
779
779
|
"runtime/lawspec_strategies.rs": "b434afecf05ddb056b03257c3b9646821161938c7acae222ef981e16a8e6d492",
|
|
780
|
-
"runtime/rust/Cargo.lock": "
|
|
781
|
-
"runtime/rust/Cargo.toml": "
|
|
780
|
+
"runtime/rust/Cargo.lock": "3474c5430d75935dbf5a0cc17382014d0b4ea39276f864c6465efbb8fab81a01",
|
|
781
|
+
"runtime/rust/Cargo.toml": "3dc9a270ac95d2e04818e5e6add970fd1ba7b297d880a429cfa4287151c50613",
|
|
782
782
|
"src/LawSpec/Abilities.hs": "79e900dea8c07ec0ca724d6301b4a489332de0cc0d7ce46511a16a21bca13831",
|
|
783
783
|
"src/LawSpec/AbilityEmit.hs": "8c8f5465d537cd4624c6eb3d14b0758bab471004d79abad004895a50588c64b1",
|
|
784
784
|
"src/LawSpec/AbilityEmit/Go.hs": "7fd47822e253773c1843992a2848723ac496682d65a5618f593cf41fbed19d86",
|
|
@@ -995,7 +995,7 @@
|
|
|
995
995
|
"src/LawSpec/OperationChecks.hs": "00094994bca2e62d0d77741508ae2336588cb22896864a798940281ec814a994",
|
|
996
996
|
"src/LawSpec/OutputLayout.hs": "b4533f8937661bd2c609c0f6ba46382d9ad4aec09a9eb1117cc386f50446fb4a",
|
|
997
997
|
"src/LawSpec/Packages.hs": "fd66ad5a6bdd167d518d2548df21f12a6af02e2d635c1993bf3e309824b1d8b4",
|
|
998
|
-
"src/LawSpec/Parser.hs": "
|
|
998
|
+
"src/LawSpec/Parser.hs": "f99b25ba14622487f78f9e33bfd0cb5ebd42bb8b02bebbdf4d0b7639f948c1ac",
|
|
999
999
|
"src/LawSpec/Persist.hs": "a354a57cffc7d61d2b9c5aa35e246633997a79a0f8ef0b087b70c4e348698251",
|
|
1000
1000
|
"src/LawSpec/PortableGenerator.hs": "a1784e7c7d4dc53f510a40077a7601e7b41946d07a0736884e12990bb4715aad",
|
|
1001
1001
|
"src/LawSpec/PortableTestHelpers.hs": "7ae7a2404f670ee481e364bdee252febeddadc6574aa1ad883e9193cd178e227",
|
|
@@ -1052,7 +1052,7 @@
|
|
|
1052
1052
|
"src/LawSpec/SourceOrigins.hs": "7387df6cf5d8f30f4cf47593a49acab39a6bc9554eeb3bfdaf5ddc9a2bef8076",
|
|
1053
1053
|
"src/LawSpec/SourceRecords.hs": "6d7fbc5436161fa50cfbf728f54497f64f285542fd49be4e8c70c780e1f3edf7",
|
|
1054
1054
|
"src/LawSpec/SourceSyntax.hs": "62965163c1d23ff437f0c59c2606d933cde92b229465bcd2b848fcfb47471570",
|
|
1055
|
-
"src/LawSpec/SourceText.hs": "
|
|
1055
|
+
"src/LawSpec/SourceText.hs": "fe18ee314111db8e0582425a5663ce18bc0dcefb8d86038c54dee6e42f1cd006",
|
|
1056
1056
|
"src/LawSpec/SourceTokens.hs": "36849db91ca639864f792d0dbe47de1568636199764a6db133a723acf49e0d8b",
|
|
1057
1057
|
"src/LawSpec/SpecializeDefinitions.hs": "b6c46445e923a8c4332807a0e2cac6663a93559ac3abf41ddadcdc8df4f6d28c",
|
|
1058
1058
|
"src/LawSpec/StatefulModel.hs": "554eece7a55696717456b0868dcc8ed1f1aecceda39ac3c3ff11b6a2f1c3450b",
|
|
@@ -1114,9 +1114,9 @@
|
|
|
1114
1114
|
"wasm/app/Exports.hs": "7698bc8dcdbd3e00cc62d0597626a6dabe29aace9258645d1df266be1f3c408c",
|
|
1115
1115
|
"wasm/cabal.project": "91ad752c055a034fff42bf1815125ce2174630a41859fe8d5c571e9a12e50b7d",
|
|
1116
1116
|
"wasm/cabal.project.freeze": "e067df77442b8111c97b3f12cc215af5ca69668aa65f95f3ff90110c22933170",
|
|
1117
|
-
"wasm/lawspec-wasm.cabal": "
|
|
1118
|
-
"npm/core.wasm": "
|
|
1119
|
-
"npm/core_jsffi.js": "
|
|
1117
|
+
"wasm/lawspec-wasm.cabal": "34d572f2fdc3b7434bc45d9f9e53e2987510c225085b7c31e363c6ae3ab5741e",
|
|
1118
|
+
"npm/core.wasm": "a2b991ad7cdedb88da52bfdde1ef186532c4ba0101294806b1f05bc018f62622",
|
|
1119
|
+
"npm/core_jsffi.js": "9917a2749cd6b1f0871ff92741edbd30307ff80ea2ed9c9a166941e5c6833607",
|
|
1120
1120
|
"npm/api.mjs": "d3928fad743a316a026f5d6658e75a9f390626ac3f28b182591a5e93d7cf9888",
|
|
1121
1121
|
"npm/index.d.ts": "01f9d73d5eefaf89564e96412b07a769f5625d0f7681b7f49e20889f512fc8b4"
|
|
1122
1122
|
}
|
package/core.wasm
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/core.wasm
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 91889545 bytes
|
|
4
|
+
sha256: a2b991ad7cdedb88da52bfdde1ef186532c4ba0101294806b1f05bc018f62622
|
package/core_jsffi.js
CHANGED
|
@@ -92,11 +92,11 @@ newJSVal: (v) => __ghc_wasm_jsffi_jsval_manager.newJSVal(v),
|
|
|
92
92
|
getJSVal: (k) => __ghc_wasm_jsffi_jsval_manager.getJSVal(k),
|
|
93
93
|
freeJSVal: (k) => __ghc_wasm_jsffi_jsval_manager.freeJSVal(k),
|
|
94
94
|
scheduleWork: () => setImmediate(__exports.rts_schedulerLoop),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
ZC1ZClawspeczmwasmzm0zi31zi1zminplacezmlawspeczmwasmZCMainZC: ($1) => (($1.parts.push($1.decoder.decode()), $1.parts.join(''))),
|
|
96
|
+
ZC2ZClawspeczmwasmzm0zi31zi1zminplacezmlawspeczmwasmZCMainZC: ($1,$2,$3) => ($1.parts.push($1.decoder.decode(new Uint8Array(__exports.memory.buffer, $2 >>> 0, $3), {stream: true}))),
|
|
97
|
+
ZC3ZClawspeczmwasmzm0zi31zi1zminplacezmlawspeczmwasmZCMainZC: () => (({decoder: new TextDecoder('utf-8', {fatal: true}), parts: []})),
|
|
98
|
+
ZC4ZClawspeczmwasmzm0zi31zi1zminplacezmlawspeczmwasmZCMainZC: ($1,$2,$3) => ((new TextEncoder()).encodeInto($1, new Uint8Array(__exports.memory.buffer, $2 >>> 0, $3)).written),
|
|
99
|
+
ZC5ZClawspeczmwasmzm0zi31zi1zminplacezmlawspeczmwasmZCMainZC: ($1) => ($1.length),
|
|
100
100
|
ZC0ZCghczminternalZCGHCziInternalziWasmziPrimziExportsZC: ($1,$2) => ($1.reject(new WebAssembly.RuntimeError($2))),
|
|
101
101
|
ZC18ZCghczminternalZCGHCziInternalziWasmziPrimziExportsZC: ($1,$2) => ($1.resolve($2)),
|
|
102
102
|
ZC20ZCghczminternalZCGHCziInternalziWasmziPrimziExportsZC: ($1) => {$1.throwTo = () => {};},
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
const commonName = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2
|
+
const reserved = new Set([
|
|
3
|
+
'abstract',
|
|
4
|
+
'and',
|
|
5
|
+
'as',
|
|
6
|
+
'assert',
|
|
7
|
+
'base',
|
|
8
|
+
'begin',
|
|
9
|
+
'class',
|
|
10
|
+
'default',
|
|
11
|
+
'delegate',
|
|
12
|
+
'do',
|
|
13
|
+
'done',
|
|
14
|
+
'downcast',
|
|
15
|
+
'downto',
|
|
16
|
+
'elif',
|
|
17
|
+
'else',
|
|
18
|
+
'end',
|
|
19
|
+
'exception',
|
|
20
|
+
'extern',
|
|
21
|
+
'false',
|
|
22
|
+
'finally',
|
|
23
|
+
'fixed',
|
|
24
|
+
'for',
|
|
25
|
+
'fun',
|
|
26
|
+
'function',
|
|
27
|
+
'global',
|
|
28
|
+
'if',
|
|
29
|
+
'in',
|
|
30
|
+
'inherit',
|
|
31
|
+
'inline',
|
|
32
|
+
'interface',
|
|
33
|
+
'internal',
|
|
34
|
+
'lazy',
|
|
35
|
+
'let',
|
|
36
|
+
'match',
|
|
37
|
+
'member',
|
|
38
|
+
'module',
|
|
39
|
+
'mutable',
|
|
40
|
+
'namespace',
|
|
41
|
+
'new',
|
|
42
|
+
'null',
|
|
43
|
+
'of',
|
|
44
|
+
'open',
|
|
45
|
+
'or',
|
|
46
|
+
'override',
|
|
47
|
+
'private',
|
|
48
|
+
'public',
|
|
49
|
+
'rec',
|
|
50
|
+
'return',
|
|
51
|
+
'sig',
|
|
52
|
+
'static',
|
|
53
|
+
'struct',
|
|
54
|
+
'then',
|
|
55
|
+
'to',
|
|
56
|
+
'true',
|
|
57
|
+
'try',
|
|
58
|
+
'type',
|
|
59
|
+
'upcast',
|
|
60
|
+
'use',
|
|
61
|
+
'val',
|
|
62
|
+
'void',
|
|
63
|
+
'when',
|
|
64
|
+
'while',
|
|
65
|
+
'with',
|
|
66
|
+
'yield',
|
|
67
|
+
]);
|
|
68
|
+
function shape(type)
|
|
69
|
+
{
|
|
70
|
+
if (
|
|
71
|
+
type?.kind === 'constructor' &&
|
|
72
|
+
type.name === 'Bool' &&
|
|
73
|
+
type.arguments.length === 0
|
|
74
|
+
)
|
|
75
|
+
{
|
|
76
|
+
return 'boolean';
|
|
77
|
+
}
|
|
78
|
+
if (
|
|
79
|
+
type?.kind === 'constructor' &&
|
|
80
|
+
type.name === 'Int32' &&
|
|
81
|
+
type.arguments.length === 0
|
|
82
|
+
)
|
|
83
|
+
{
|
|
84
|
+
return 'integer';
|
|
85
|
+
}
|
|
86
|
+
if (
|
|
87
|
+
type?.kind === 'constructor' &&
|
|
88
|
+
type.name === 'List' &&
|
|
89
|
+
type.arguments.length === 1 &&
|
|
90
|
+
type.arguments[0].kind === 'type' &&
|
|
91
|
+
shape(type.arguments[0].type) === 'integer'
|
|
92
|
+
)
|
|
93
|
+
{
|
|
94
|
+
return 'list';
|
|
95
|
+
}
|
|
96
|
+
throw new Error(
|
|
97
|
+
'Unsupported browser adapter type: ' +
|
|
98
|
+
JSON.stringify(type) +
|
|
99
|
+
'. The preview supports Int32, Bool and List Int32.',
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
/** Derive the implementation boundary from checked declarations, excluding functions whose definitions LawSpec already provides. ref:DEC-learn-generated-boundaries */
|
|
103
|
+
export function implementationBinding(checked, sourcePaths)
|
|
104
|
+
{
|
|
105
|
+
const defined = new Set((checked.definitions ?? []).map(row => row.id));
|
|
106
|
+
const candidates = (checked.units ?? [])
|
|
107
|
+
.flatMap(unit =>
|
|
108
|
+
unit.declarations.map(declaration => ({unit: unit.id, declaration})),
|
|
109
|
+
)
|
|
110
|
+
.filter(
|
|
111
|
+
({declaration}) =>
|
|
112
|
+
declaration.origin?.kind === 'source' &&
|
|
113
|
+
(sourcePaths ?? ['Tests.lawspec']).includes(
|
|
114
|
+
declaration.origin.span?.start.file,
|
|
115
|
+
) &&
|
|
116
|
+
!defined.has(declaration.id),
|
|
117
|
+
);
|
|
118
|
+
if (candidates.length !== 1)
|
|
119
|
+
{
|
|
120
|
+
throw new Error(
|
|
121
|
+
`Unsupported browser adapter project: expected one implementation declaration, found ${candidates.length}.`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
const {unit, declaration} = candidates[0];
|
|
125
|
+
if (!commonName.test(declaration.name) || reserved.has(declaration.name))
|
|
126
|
+
{
|
|
127
|
+
throw new Error(
|
|
128
|
+
'Unsupported cross-language implementation name: ' + declaration.name,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
let result = declaration.type;
|
|
132
|
+
const inputs = [];
|
|
133
|
+
while (result.kind === 'function')
|
|
134
|
+
{
|
|
135
|
+
inputs.push(shape(result.parameter));
|
|
136
|
+
result = result.result;
|
|
137
|
+
}
|
|
138
|
+
if (inputs.includes('boolean'))
|
|
139
|
+
{
|
|
140
|
+
throw new Error(
|
|
141
|
+
'Unsupported browser generator input: Bool; Boolean results are supported.',
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
if (
|
|
145
|
+
!inputs.length ||
|
|
146
|
+
inputs.length > 8 ||
|
|
147
|
+
(inputs.length > 1 && inputs.some(value => value !== 'integer'))
|
|
148
|
+
)
|
|
149
|
+
{
|
|
150
|
+
throw new Error(
|
|
151
|
+
'Unsupported browser adapter signature: multiple inputs must be Int32.',
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
declaration: declaration.id,
|
|
156
|
+
unit,
|
|
157
|
+
name: declaration.name,
|
|
158
|
+
inputs,
|
|
159
|
+
input: inputs.length > 1 ? 'tuple' : inputs[0],
|
|
160
|
+
output: shape(result),
|
|
161
|
+
checkedType: declaration.type,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/** Emit the F# bridge from the checked input/result shapes; Fable checks the bridge together with learner code. ref:DEC-learn-generated-boundaries */
|
|
165
|
+
export function fsharpAdapter(binding)
|
|
166
|
+
{
|
|
167
|
+
const inputs = binding.inputs ?? [binding.input];
|
|
168
|
+
const inputType =
|
|
169
|
+
inputs.length > 1 || binding.input === 'list' ? 'int array' : 'int';
|
|
170
|
+
const arguments_ =
|
|
171
|
+
inputs.length > 1
|
|
172
|
+
? inputs.map((_, i) => `input[${i}]`).join(' ')
|
|
173
|
+
: binding.input === 'list'
|
|
174
|
+
? '(Array.toList input)'
|
|
175
|
+
: 'input';
|
|
176
|
+
const resultType =
|
|
177
|
+
binding.output === 'list'
|
|
178
|
+
? 'int array'
|
|
179
|
+
: binding.output === 'boolean'
|
|
180
|
+
? 'bool'
|
|
181
|
+
: 'int';
|
|
182
|
+
return `module Adapter\nlet call (input: ${inputType}) : ${resultType} = Solution.${binding.name} ${arguments_}${binding.output === 'list' ? ' |> List.toArray' : ''}\n`;
|
|
183
|
+
}
|
|
184
|
+
/** Emit the typed implementation boundary only; every assertion comes from generated LawSpec tests. ref:DEC-learn-tests-in-lawspec */
|
|
185
|
+
export function adapterSource(binding, language)
|
|
186
|
+
{
|
|
187
|
+
const raw =
|
|
188
|
+
language === 'fsharp'
|
|
189
|
+
? 'Adapter.js'
|
|
190
|
+
: `Solution.${language === 'typescript' ? 'ts' : 'js'}`;
|
|
191
|
+
const inputs = binding.inputs ?? [binding.input];
|
|
192
|
+
const convert = value =>
|
|
193
|
+
value === 'integer' ? 'integer' : value === 'boolean' ? 'boolean' : 'list';
|
|
194
|
+
const validateInput =
|
|
195
|
+
inputs.length > 1 ? 'tuple(input)' : `${convert(binding.input)}(input)`;
|
|
196
|
+
const args =
|
|
197
|
+
inputs.length > 1
|
|
198
|
+
? inputs.map((value, i) => `${convert(value)}(input[${i}])`).join(', ')
|
|
199
|
+
: `${convert(binding.input)}(input)`;
|
|
200
|
+
const invoke =
|
|
201
|
+
language === 'fsharp'
|
|
202
|
+
? `solution.call(input)`
|
|
203
|
+
: `solution.${binding.name}(${args})`;
|
|
204
|
+
return `import * as solution from './${raw}';
|
|
205
|
+
const integer=x=>{if(!Number.isInteger(x)||x< -2147483648||x>2147483647)throw new TypeError('Adapter expects Int32');return x;};
|
|
206
|
+
const boolean=x=>{if(typeof x!=='boolean')throw new TypeError('Adapter expects Bool');return x;};
|
|
207
|
+
const list=xs=>{if(!Array.isArray(xs))throw new TypeError('Adapter expects an integer list');return xs.map(integer);};
|
|
208
|
+
const tuple=xs=>{if(!Array.isArray(xs)||xs.length!==${inputs.length})throw new TypeError('Adapter expects ${inputs.length} arguments');return xs.map(integer);};
|
|
209
|
+
export const call=input=>{input=${validateInput};const output=${convert(binding.output)}(${invoke});globalThis.__lessonObserveCall?.(input,output);return output;};
|
|
210
|
+
${inputs.length > 1 ? `export const ${binding.name}=(...inputs)=>call(inputs);` : `export {call as ${binding.name}};`}`;
|
|
211
|
+
}
|
|
212
|
+
/** Use the compiler's actual user-owned module path when wiring generated tests to the checked implementation. ref:DEC-learn-generated-boundaries */
|
|
213
|
+
export function harnessModule(plan, binding)
|
|
214
|
+
{
|
|
215
|
+
const expected = 'src/' + binding.unit.split('.').join('/') + '.mjs';
|
|
216
|
+
const files = plan.files.filter(
|
|
217
|
+
file => file.placement === 'source' && file.path === expected,
|
|
218
|
+
);
|
|
219
|
+
if (files.length !== 1)
|
|
220
|
+
{
|
|
221
|
+
throw new Error(
|
|
222
|
+
`Unsupported browser module graph: expected one native implementation module, found ${files.length}.`,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return files[0].path;
|
|
226
|
+
}
|