From 668ed05cda07f4e137916b050b98e659ff1ea3dd Mon Sep 17 00:00:00 2001 From: Ben Price Date: Tue, 26 Sep 2023 16:49:17 +0100 Subject: [PATCH 1/2] chore(nix): bump Primer pin The new Primer pin adds a new option to EvalFull (which controls evaluation under binders), and changes the default behaviour to not evaluate under binders. Signed-off-by: Ben Price --- argocd/base/statefulset.yaml | 2 +- flake.lock | 200 +++++++++++++++---------- flake.nix | 2 +- src/primer-api/model/evalFullClosed.ts | 16 ++ src/primer-api/model/evalFullParams.ts | 2 + src/primer-api/model/index.ts | 1 + 6 files changed, 141 insertions(+), 82 deletions(-) create mode 100644 src/primer-api/model/evalFullClosed.ts diff --git a/argocd/base/statefulset.yaml b/argocd/base/statefulset.yaml index fc02b333..e6e92bab 100644 --- a/argocd/base/statefulset.yaml +++ b/argocd/base/statefulset.yaml @@ -26,7 +26,7 @@ spec: # Note: use the *dev* version of the package here, so that # PRs can deploy `primer-service` container images that have # not yet been merged to `primer` `main`. - image: ghcr.io/hackworthltd/primer-service-dev:git-e603e61697d00a76c52252d154a5179fc9779417 + image: ghcr.io/hackworthltd/primer-service-dev:git-1ab647e2b27e37da9cc7e461ca311cc58f2c59bb ports: - containerPort: 8081 env: diff --git a/flake.lock b/flake.lock index f3cf7b6f..aa1c8dba 100644 --- a/flake.lock +++ b/flake.lock @@ -269,11 +269,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "lastModified": 1693611461, + "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", "type": "github" }, "original": { @@ -287,11 +287,11 @@ "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "lastModified": 1693611461, + "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", "type": "github" }, "original": { @@ -355,22 +355,6 @@ } }, "flake-utils_4": { - "locked": { - "lastModified": 1679360468, - "narHash": "sha256-LGnza3cfXF10Biw3ZTg0u9o9t7s680Ww200t5KkHTh8=", - "owner": "hamishmack", - "repo": "flake-utils", - "rev": "e1ea268ff47ad475443dbabcd54744b4e5b9d4f5", - "type": "github" - }, - "original": { - "owner": "hamishmack", - "ref": "hkm/nested-hydraJobs", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "inputs": { "systems": "systems_4" }, @@ -405,6 +389,43 @@ "type": "github" } }, + "ghc980": { + "flake": false, + "locked": { + "lastModified": 1692910316, + "narHash": "sha256-Qv8I3GzzIIN32RTEKI38BW5nO1f7j6Xm+dDeDUyYZWo=", + "ref": "ghc-9.8", + "rev": "249aa8193e4c5c1ee46ce29b39d2fffa57de7904", + "revCount": 61566, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + }, + "original": { + "ref": "ghc-9.8", + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + } + }, + "ghc99": { + "flake": false, + "locked": { + "lastModified": 1693974777, + "narHash": "sha256-r+uFw44X9XVPdDtxylfBuFL+l+5q5cX+vDVT7SCTHB8=", + "ref": "hkm/bump-Cabal", + "rev": "b2bddd0b8214ac1db6239cc25f7c0aabeb2ebb70", + "revCount": 61879, + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/ghc" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://gitlab.haskell.org/ghc/ghc" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -444,11 +465,11 @@ "gitignore-nix_2": { "flake": false, "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "lastModified": 1694102001, + "narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6", "type": "github" }, "original": { @@ -548,11 +569,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1690676776, - "narHash": "sha256-6z8zYs1b4ZZWSM58H41TtfM7bKEqjFW2xaCSCJUbBHk=", + "lastModified": 1694823894, + "narHash": "sha256-B6gVQFZpUe+TntqifuhBOmmEAzjiRWGraVQIR1T9YGI=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "a21057809f37315eaba0188d8a737ababcaba7f5", + "rev": "643f1c0424e5604b7676b5b48000ca1bc0c2d7b8", "type": "github" }, "original": { @@ -599,11 +620,11 @@ "pre-commit-hooks-nix": "pre-commit-hooks-nix_3" }, "locked": { - "lastModified": 1690739279, - "narHash": "sha256-BOA2TEpUHXzdUwa077CgZ7e8hlKuGaN1QjNMG/RwjKw=", + "lastModified": 1694821803, + "narHash": "sha256-jl3TcxkYEst8sXz1Rfp/SvRjEbcMkSAOIjPU2/AuJEw=", "owner": "hackworthltd", "repo": "hacknix", - "rev": "7d0d518171938c2b95f7cb8da58f291f5ed22f30", + "rev": "5c6afdb546b4f362d4e749d6d85b8dfc7389265a", "type": "github" }, "original": { @@ -620,11 +641,13 @@ "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", "flake-compat": "flake-compat_8", - "flake-utils": "flake-utils_4", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "ghc980": "ghc980", + "ghc99": "ghc99", "hackage": "hackage", "hls-1.10": "hls-1.10", "hls-2.0": "hls-2.0", + "hls-2.2": "hls-2.2", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", "iserv-proxy": "iserv-proxy", @@ -644,11 +667,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1690678257, - "narHash": "sha256-AwGJH6Nje2g/XzdcPEkbGB8NvxyLbW2X9EQKB7ZsIhw=", + "lastModified": 1694825384, + "narHash": "sha256-sswi86nY4y7atyZATPIMG/pqC2kod8zfgGbUzpYA/rU=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "66861ed35e43f4c1c8e4be2f11110eba3b13de48", + "rev": "a2d08de6034a838e1a276707669237933255c3bd", "type": "github" }, "original": { @@ -691,6 +714,23 @@ "type": "github" } }, + "hls-2.2": { + "flake": false, + "locked": { + "lastModified": 1693064058, + "narHash": "sha256-8DGIyz5GjuCFmohY6Fa79hHA/p1iIqubfJUTGQElbNk=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "b30f4b6cf5822f3112c35d14a0cba51f3fe23b85", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "2.2.0.0", + "repo": "haskell-language-server", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -734,11 +774,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1688517130, - "narHash": "sha256-hUqfxSlo+ffqVdkSZ1EDoB7/ILCL25eYkcCXW9/P3Wc=", + "lastModified": 1691634696, + "narHash": "sha256-MZH2NznKC/gbgBu8NgIibtSUZeJ00HTLJ0PlWKCBHb0=", "ref": "hkm/remote-iserv", - "rev": "9151db2a9a61d7f5fe52ff8836f18bbd0fd8933c", - "revCount": 13, + "rev": "43a979272d9addc29fbffc2e8542c5d96e993d73", + "revCount": 14, "type": "git", "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" }, @@ -808,11 +848,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1690431538, - "narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=", + "lastModified": 1694810318, + "narHash": "sha256-LuvrVj2oj9TzdnnwtQUClqcXjpgwCP01FFVBM7azGV8=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "16c07487ac9bc59f58b121d13160c67befa3342e", + "rev": "80bb201f4925cdda5a7a3c7b1900fb26bb2af2e8", "type": "github" }, "original": { @@ -838,11 +878,11 @@ }, "nixlib_2": { "locked": { - "lastModified": 1689469483, - "narHash": "sha256-2SBhY7rZQ/iNCxe04Eqxlz9YK9KgbaTMBssq3/BgdWY=", + "lastModified": 1693701915, + "narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "02fea408f27186f139153e1ae88f8ab2abd9c22c", + "rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25", "type": "github" }, "original": { @@ -883,11 +923,11 @@ ] }, "locked": { - "lastModified": 1690133435, - "narHash": "sha256-YNZiefETggroaTLsLJG2M+wpF0pJPwiauKG4q48ddNU=", + "lastModified": 1693791338, + "narHash": "sha256-wHmtB5H8AJTUaeGHw+0hsQ6nU4VyvVrP2P4NeCocRzY=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "b1171de4d362c022130c92d7c8adc4bf2b83d586", + "rev": "8ee78470029e641cddbd8721496da1316b47d3b4", "type": "github" }, "original": { @@ -959,11 +999,11 @@ }, "nixpkgs-2205": { "locked": { - "lastModified": 1682600000, - "narHash": "sha256-ha4BehR1dh8EnXSoE1m/wyyYVvHI9txjW4w5/oxsW5Y=", + "lastModified": 1685573264, + "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "50fc86b75d2744e1ab3837ef74b53f103a9b55a0", + "rev": "380be19fbd2d9079f677978361792cb25e8a3635", "type": "github" }, "original": { @@ -975,11 +1015,11 @@ }, "nixpkgs-2211": { "locked": { - "lastModified": 1685314633, - "narHash": "sha256-8LXBPqTQXl5ofkjpJ18JcbmLJ/lWDoMxtUwiDYv0wro=", + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c8a17ce7abc03c50cd072e9e6c9b389c5f61836b", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", "type": "github" }, "original": { @@ -991,11 +1031,11 @@ }, "nixpkgs-2305": { "locked": { - "lastModified": 1685338297, - "narHash": "sha256-+Aq4O0Jn1W1q927ZHc3Zn6RO7bwQGmb6O8xYoGy0KrM=", + "lastModified": 1690680713, + "narHash": "sha256-NXCWA8N+GfSQyoN7ZNiOgq/nDJKOp5/BHEpiZP8sUZw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6287b47dbfabbb8bfbb9b1b53d198ad58a774de4", + "rev": "b81af66deb21f73a70c67e5ea189568af53b1e8c", "type": "github" }, "original": { @@ -1044,11 +1084,11 @@ "nixpkgs-lib_3": { "locked": { "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "lastModified": 1693471703, + "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", "type": "github" }, "original": { @@ -1062,11 +1102,11 @@ "nixpkgs-lib_4": { "locked": { "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "lastModified": 1693471703, + "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", "type": "github" }, "original": { @@ -1159,11 +1199,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1685347552, - "narHash": "sha256-9woSppRyUFo26yUffORTzttJ+apOt8MmCv6RxpPNTU4=", + "lastModified": 1690720142, + "narHash": "sha256-GywuiZjBKfFkntQwpNQfL+Ksa2iGjPprBGL0/psgRZM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f2f1ec390714d303cf84ba086e34e45b450dd8c4", + "rev": "3acb5c4264c490e7714d503c7166a3fde0c51324", "type": "github" }, "original": { @@ -1297,11 +1337,11 @@ "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1690464206, - "narHash": "sha256-38V4kmOh6ikpfGiAS+Kt2H/TA2DubSqE66veP/jmB4Q=", + "lastModified": 1694364351, + "narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "9289996dcac62fd45836db7c07b87d2521eb526d", + "rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7", "type": "github" }, "original": { @@ -1313,7 +1353,7 @@ "pre-commit-hooks-nix_4": { "inputs": { "flake-compat": "flake-compat_9", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "gitignore": "gitignore_5", "nixpkgs": [ "primer", @@ -1322,11 +1362,11 @@ "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { - "lastModified": 1690743255, - "narHash": "sha256-dsJzQsyJGWCym1+LMyj2rbYmvjYmzeOrk7ypPrSFOPo=", + "lastModified": 1694364351, + "narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "fcbf4705d98398d084e6cb1c826a0b90a91d22d7", + "rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7", "type": "github" }, "original": { @@ -1349,17 +1389,17 @@ "pre-commit-hooks-nix": "pre-commit-hooks-nix_4" }, "locked": { - "lastModified": 1691486196, - "narHash": "sha256-J3cSvDSLsGD8sFBghvsUCcRSV5Crii8I9DR1IlB1q1A=", + "lastModified": 1695056024, + "narHash": "sha256-lqo1R0ihDkWE55fkWrhMrC0heoQ1csoCLsPkawdLVJI=", "owner": "hackworthltd", "repo": "primer", - "rev": "e603e61697d00a76c52252d154a5179fc9779417", + "rev": "1ab647e2b27e37da9cc7e461ca311cc58f2c59bb", "type": "github" }, "original": { "owner": "hackworthltd", "repo": "primer", - "rev": "e603e61697d00a76c52252d154a5179fc9779417", + "rev": "1ab647e2b27e37da9cc7e461ca311cc58f2c59bb", "type": "github" } }, @@ -1381,11 +1421,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1690675816, - "narHash": "sha256-2zEY60hpK8NleQgCtlTpP/bmIOE6o7ziTrcOu2Y+TMU=", + "lastModified": 1694822954, + "narHash": "sha256-9RLqpS5AoyNYMLrViEuZpuxPEpWAC2J2JWZ6yANEx3w=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "dc76687c7909334431bf6c0e7a6ad408d4fea1de", + "rev": "2d5f46010ec834c3c652ef0a1b1c17b1c9e56da4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 804bb375..d4f74a02 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ # Note: don't override any of primer's Nix flake inputs, or else # we won't hit its binary cache. - primer.url = github:hackworthltd/primer/e603e61697d00a76c52252d154a5179fc9779417; + primer.url = github:hackworthltd/primer/1ab647e2b27e37da9cc7e461ca311cc58f2c59bb; flake-parts.url = "github:hercules-ci/flake-parts"; }; diff --git a/src/primer-api/model/evalFullClosed.ts b/src/primer-api/model/evalFullClosed.ts new file mode 100644 index 00000000..a2bc4904 --- /dev/null +++ b/src/primer-api/model/evalFullClosed.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v6.17.0 🍺 + * Do not edit manually. + * Primer backend API + * A backend service implementing a pedagogic functional programming language. + * OpenAPI spec version: 0.7 + */ + +export type EvalFullClosed = typeof EvalFullClosed[keyof typeof EvalFullClosed]; + + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EvalFullClosed = { + UnderBinders: 'UnderBinders', + StopAtBinders: 'StopAtBinders', +} as const; diff --git a/src/primer-api/model/evalFullParams.ts b/src/primer-api/model/evalFullParams.ts index 8c4df2ab..0c786f5d 100644 --- a/src/primer-api/model/evalFullParams.ts +++ b/src/primer-api/model/evalFullParams.ts @@ -5,7 +5,9 @@ * A backend service implementing a pedagogic functional programming language. * OpenAPI spec version: 0.7 */ +import type { EvalFullClosed } from './evalFullClosed'; export type EvalFullParams = { stepLimit?: number; +closed?: EvalFullClosed; }; diff --git a/src/primer-api/model/index.ts b/src/primer-api/model/index.ts index 0abf5ef2..7bc55b3f 100644 --- a/src/primer-api/model/index.ts +++ b/src/primer-api/model/index.ts @@ -18,6 +18,7 @@ export * from './createDefinitionParams'; export * from './createTypeDefBody'; export * from './def'; export * from './defSelection'; +export * from './evalFullClosed'; export * from './evalFullParams'; export * from './evalFullResp'; export * from './evalFullRespOneOf'; From 6b5a1398bb997bb1d0f2690357019dff9276fa36 Mon Sep 17 00:00:00 2001 From: Ben Price Date: Tue, 26 Sep 2023 16:53:05 +0100 Subject: [PATCH 2/2] feat: display and allow editing of kinds on foralls This bumps the Primer pin, which adds support for higher-kinded polymorphism. There are no other changes required to take advantage of this feature. Signed-off-by: Ben Price --- argocd/base/statefulset.yaml | 2 +- flake.lock | 8 ++++---- flake.nix | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/argocd/base/statefulset.yaml b/argocd/base/statefulset.yaml index e6e92bab..7bbb1bb4 100644 --- a/argocd/base/statefulset.yaml +++ b/argocd/base/statefulset.yaml @@ -26,7 +26,7 @@ spec: # Note: use the *dev* version of the package here, so that # PRs can deploy `primer-service` container images that have # not yet been merged to `primer` `main`. - image: ghcr.io/hackworthltd/primer-service-dev:git-1ab647e2b27e37da9cc7e461ca311cc58f2c59bb + image: ghcr.io/hackworthltd/primer-service-dev:git-2bf2349473b60fc6a99e9a553dcd1b0fd9d54b5f ports: - containerPort: 8081 env: diff --git a/flake.lock b/flake.lock index aa1c8dba..99755f11 100644 --- a/flake.lock +++ b/flake.lock @@ -1389,17 +1389,17 @@ "pre-commit-hooks-nix": "pre-commit-hooks-nix_4" }, "locked": { - "lastModified": 1695056024, - "narHash": "sha256-lqo1R0ihDkWE55fkWrhMrC0heoQ1csoCLsPkawdLVJI=", + "lastModified": 1695132280, + "narHash": "sha256-GdBceddjUaxsv/Bvu5uSK0X2aTjSoPBOnSW1KTgxTeo=", "owner": "hackworthltd", "repo": "primer", - "rev": "1ab647e2b27e37da9cc7e461ca311cc58f2c59bb", + "rev": "2bf2349473b60fc6a99e9a553dcd1b0fd9d54b5f", "type": "github" }, "original": { "owner": "hackworthltd", "repo": "primer", - "rev": "1ab647e2b27e37da9cc7e461ca311cc58f2c59bb", + "rev": "2bf2349473b60fc6a99e9a553dcd1b0fd9d54b5f", "type": "github" } }, diff --git a/flake.nix b/flake.nix index d4f74a02..b0a6db98 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ # Note: don't override any of primer's Nix flake inputs, or else # we won't hit its binary cache. - primer.url = github:hackworthltd/primer/1ab647e2b27e37da9cc7e461ca311cc58f2c59bb; + primer.url = github:hackworthltd/primer/2bf2349473b60fc6a99e9a553dcd1b0fd9d54b5f; flake-parts.url = "github:hercules-ci/flake-parts"; };