A categorical programming language
Revision | 6cdc008aefa10ac455cf4a4ced24c877a3295a52 (tree) |
---|---|
Time | 2023-04-25 14:00:58 |
Author | Corbin <cds@corb...> |
Commiter | Corbin |
Factor the JSON schemata to their own prefix.
Straightforward deduplication, I think.
@@ -10,9 +10,10 @@ | ||
10 | 10 | pkgs = import nixpkgs { |
11 | 11 | inherit system; |
12 | 12 | }; |
13 | + schemata = ./schemata; | |
13 | 14 | jelly = import ./jelly { inherit pkgs; }; |
14 | 15 | sampler = import ./sampler { inherit pkgs; }; |
15 | - movelist = import ./movelist { inherit pkgs jelly sampler; }; | |
16 | + movelist = import ./movelist { inherit pkgs jelly sampler schemata; }; | |
16 | 17 | cammy = pkgs.stdenv.mkDerivation { |
17 | 18 | name = "cammy"; |
18 | 19 | version = "0.4"; |
@@ -1,4 +1,4 @@ | ||
1 | -{ jelly, sampler, pkgs ? import <nixpkgs> {} }: | |
1 | +{ jelly, sampler, schemata, pkgs ? import <nixpkgs> {} }: | |
2 | 2 | let |
3 | 3 | eggs = import ./eggs.nix { |
4 | 4 | inherit pkgs; |
@@ -20,7 +20,7 @@ in pkgs.stdenv.mkDerivation { | ||
20 | 20 | sed -i cammy-repl.scm \ |
21 | 21 | -e "s,@SAMPLER@,${sampler}/bin/cammy-sample,g" \ |
22 | 22 | -e "s,@JELLY@,${jelly}/bin/jelly,g" \ |
23 | - -e "s,@JETS@,$out/share/jets.json,g" | |
23 | + -e "s,@JETS@,${schemata}/jets.json,g" | |
24 | 24 | echo "Patched jelly and sampler paths for REPL" |
25 | 25 | ''; |
26 | 26 |
@@ -47,7 +47,5 @@ in pkgs.stdenv.mkDerivation { | ||
47 | 47 | echo "Installing executable $exe" |
48 | 48 | cp $exe $out/bin/ |
49 | 49 | done |
50 | - mkdir -p $out/share/ | |
51 | - cp jets.json $out/share/ | |
52 | 50 | ''; |
53 | 51 | } |
@@ -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 | -} |