From 5b234f1eb0b029f81cd70014d86a9041f25e8a34 Mon Sep 17 00:00:00 2001 From: Michael Martin-Smucker Date: Tue, 31 Mar 2020 19:47:55 -0600 Subject: [PATCH] Update to Bastet --- bsconfig.json | 2 +- package-lock.json | 38 +++++++++++++++++++++++++++----------- package.json | 12 ++++++------ src/ReludeRandom.rei | 8 ++++---- test/util/TestUtil.re | 4 ++-- 5 files changed, 40 insertions(+), 24 deletions(-) diff --git a/bsconfig.json b/bsconfig.json index 7953842..9619496 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -17,7 +17,7 @@ }, "suffix": ".bs.js", "bs-dependencies": [ - "bs-abstract", + "bs-bastet", "relude" ], "bs-dev-dependencies": [ diff --git a/package-lock.json b/package-lock.json index ca9e8c5..5d3c9a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -772,6 +772,12 @@ "file-uri-to-path": "1.0.0" } }, + "bisect_ppx": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bisect_ppx/-/bisect_ppx-2.2.0.tgz", + "integrity": "sha512-akc+i8Eff7sBXS0c/vemzhxGjxOrKcDs/0MPtOcUifmo9D1Nvcb2NRANim4q3L01ARdS5a//DrR9iwdX+u95kQ==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -834,16 +840,26 @@ } } }, - "bs-abstract": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/bs-abstract/-/bs-abstract-0.18.0.tgz", - "integrity": "sha512-kohLdSzk6fIw4u+O214/0paiPmhkJ+ChBOrXLWufQGT/aLu6hOWNlLIpWX7BFi7oGEsUMlIBxTs5jPWBT9gnjg==", - "dev": true + "bs-bastet": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/bs-bastet/-/bs-bastet-1.2.5.tgz", + "integrity": "sha512-XIMv0CpovzTXmrEnzwnY2M3MuuesbGSzs+yaFvb3NAVyIP/aLlXCRv/roH6qybDBIGwW9JjbB7lxo73yqMi1qg==", + "dev": true, + "requires": { + "bisect_ppx": "^2.1.0", + "bs-stdlib-shims": "^0.1.0" + } }, "bs-platform": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.0.1.tgz", - "integrity": "sha512-UjStdtHhbtC/l6vKJ1XRDqrPk7rFf5PLYHtRX3akDXEYVnTbN36z0g4DEr5mU8S0N945e33HYts9x+i7hKKpZQ==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.2.2.tgz", + "integrity": "sha512-PWcFfN+jCTtT/rMaHDhKh+W9RUTpaRunmSF9vbLYcrJbpgCNW6aFKAY33u0P3mLxwuhshN3b4FxqGUBPj6exZQ==", + "dev": true + }, + "bs-stdlib-shims": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bs-stdlib-shims/-/bs-stdlib-shims-0.1.0.tgz", + "integrity": "sha512-CszWow8iXOKgmzNCc5dR3kERaqzIp3f4nbV7lJF5vS9BHm70GqLlu7OBE/VCPKZ5noG1VtJAIVqIdLFqUdIRUQ==", "dev": true }, "bser": { @@ -3868,9 +3884,9 @@ } }, "relude": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/relude/-/relude-0.47.0.tgz", - "integrity": "sha512-Q/MGDfya3qwy/zWDGm1ioL0wWJDQ2kti95W5GyShfds1QiNhCsOx4DLeWurPvDq6VA5k09xLNvukxa8rTX2uZA==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/relude/-/relude-0.59.0.tgz", + "integrity": "sha512-Rc+Lr2SjsGJAejuF7yHqzk3Gsr0Ha4JpdRTn+17DYxbQjLVNHPcO24JSGBHaADdyHJMuNbCHqr/1O+LWb2eIaQ==", "dev": true }, "remove-trailing-separator": { diff --git a/package.json b/package.json index 97cef55..f0e9ac7 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,15 @@ "author": "", "license": "MIT", "peerDependencies": { - "bs-abstract": "^0.18.0", - "bs-platform": "^7.0.1", - "relude": "^0.47.0" + "bs-bastet": "^1.2.5", + "bs-platform": "^7.2.2", + "relude": "^0.59.0" }, "devDependencies": { "@glennsl/bs-jest": "^0.4.9", - "bs-abstract": "^0.18.0", - "bs-platform": "^7.0.1", - "relude": "^0.47.0" + "bs-bastet": "^1.2.5", + "bs-platform": "^7.2.2", + "relude": "^0.59.0" }, "jest": { "coveragePathIgnorePatterns": [ diff --git a/src/ReludeRandom.rei b/src/ReludeRandom.rei index 87bca04..1033eaa 100644 --- a/src/ReludeRandom.rei +++ b/src/ReludeRandom.rei @@ -25,14 +25,14 @@ module Seed: { module Generator: { type t('a); - module Functor: BsAbstract.Interface.FUNCTOR with type t('a) = t('a); + module Functor: BsBastet.Interface.FUNCTOR with type t('a) = t('a); - module Apply: BsAbstract.Interface.APPLY with type t('a) = t('a); + module Apply: BsBastet.Interface.APPLY with type t('a) = t('a); module Applicative: - BsAbstract.Interface.APPLICATIVE with type t('a) = t('a); + BsBastet.Interface.APPLICATIVE with type t('a) = t('a); - module Monad: BsAbstract.Interface.MONAD with type t('a) = t('a); + module Monad: BsBastet.Interface.MONAD with type t('a) = t('a); /** * Run a generator with the provided seed, getting back a tuple of the random * value and the next seed. diff --git a/test/util/TestUtil.re b/test/util/TestUtil.re index 5c27ec5..58acfb9 100644 --- a/test/util/TestUtil.re +++ b/test/util/TestUtil.re @@ -45,7 +45,7 @@ module Weekday = { }; let collectCounts = - (type a, ord: (module BsAbstract.Interface.ORD with type t = a), xs) => { + (type a, ord: (module BsBastet.Interface.ORD with type t = a), xs) => { module Ord = (val ord); module M = Map.WithOrd(Ord); List.foldLeft( @@ -59,7 +59,7 @@ let collectCounts = let testDistribution = ( type a, - ord: (module BsAbstract.Interface.ORD with type t = a), + ord: (module BsBastet.Interface.ORD with type t = a), ~samples=10000, gen: Generator.t(a), seed,