• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


Commit MetaInfo

Revision6cdc008aefa10ac455cf4a4ced24c877a3295a52 (tree)
Time2023-04-25 14:00:58
AuthorCorbin <cds@corb...>
CommiterCorbin

Log Message

Factor the JSON schemata to their own prefix.

Straightforward deduplication, I think.

Change Summary

Incremental Difference

--- a/flake.nix
+++ b/flake.nix
@@ -10,9 +10,10 @@
1010 pkgs = import nixpkgs {
1111 inherit system;
1212 };
13+ schemata = ./schemata;
1314 jelly = import ./jelly { inherit pkgs; };
1415 sampler = import ./sampler { inherit pkgs; };
15- movelist = import ./movelist { inherit pkgs jelly sampler; };
16+ movelist = import ./movelist { inherit pkgs jelly sampler schemata; };
1617 cammy = pkgs.stdenv.mkDerivation {
1718 name = "cammy";
1819 version = "0.4";
--- a/movelist/default.nix
+++ b/movelist/default.nix
@@ -1,4 +1,4 @@
1-{ jelly, sampler, pkgs ? import <nixpkgs> {} }:
1+{ jelly, sampler, schemata, pkgs ? import <nixpkgs> {} }:
22 let
33 eggs = import ./eggs.nix {
44 inherit pkgs;
@@ -20,7 +20,7 @@ in pkgs.stdenv.mkDerivation {
2020 sed -i cammy-repl.scm \
2121 -e "s,@SAMPLER@,${sampler}/bin/cammy-sample,g" \
2222 -e "s,@JELLY@,${jelly}/bin/jelly,g" \
23- -e "s,@JETS@,$out/share/jets.json,g"
23+ -e "s,@JETS@,${schemata}/jets.json,g"
2424 echo "Patched jelly and sampler paths for REPL"
2525 '';
2626
@@ -47,7 +47,5 @@ in pkgs.stdenv.mkDerivation {
4747 echo "Installing executable $exe"
4848 cp $exe $out/bin/
4949 done
50- mkdir -p $out/share/
51- cp jets.json $out/share/
5250 '';
5351 }
--- a/movelist/jets.json
+++ /dev/null
@@ -1,9 +0,0 @@
1-{
2- "dup": ["pair", "id", "id"],
3- "swap": ["pair", "snd", "fst"],
4- "app": ["uncurry", "id"],
5- "n-pred-maybe": ["pr", "right", ["comp", ["case", "succ", "zero"], "left"]],
6- "n-add": ["uncurry", ["pr", ["curry", "snd"], ["curry", ["comp", "app", "succ"]]]],
7- "n-mul": ["uncurry", ["pr", ["curry", ["comp", "ignore", "zero"]], ["curry", ["comp", ["pair", "app", "snd"], "n-add"]]]],
8- "n-double": ["pr", "zero", ["comp", "succ" ,"succ"]]
9-}