This commit is contained in:
Michael Zhang 2022-12-16 07:31:39 -06:00
commit e7e4cf403d
Signed by: michael
GPG Key ID: BDA47A31A3C8EE6B
6 changed files with 140 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bin
.direnv
/result*

11
default.nix Normal file
View File

@ -0,0 +1,11 @@
{ mkSilverBin, nix-gitignore }:
mkSilverBin {
pname = "ableGo";
version = "0.1.0";
src = nix-gitignore.gitignoreSource [ ./.gitignore ] ./.;
grammarName = "io:mzhang:ableGo:compiler";
javaFlags = [ "-Xss8M" ];
}

88
flake.lock Normal file
View File

@ -0,0 +1,88 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"melt": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1667881871,
"narHash": "sha256-Tf1NSz9p5JezcWFSmL/nrqoC8qSVFmqHQjnAAnV5uQs=",
"owner": "~remexre",
"repo": "melt.nix",
"rev": "e5c89aee04f575e08cf75e98009d1604db81844c",
"type": "sourcehut"
},
"original": {
"owner": "~remexre",
"repo": "melt.nix",
"type": "sourcehut"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1666926733,
"narHash": "sha256-+gYfOEnQVISPDRNoWm2VJD5OEuTUySt48RchLpvm61o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f44ba1be526c8da9e79a5759feca2365204003f6",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1667629849,
"narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3bacde6273b09a21a8ccfba15586fb165078fb62",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"melt": "melt",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

26
flake.nix Normal file
View File

@ -0,0 +1,26 @@
{
description = "A very basic flake";
inputs.melt.url = "sourcehut:~remexre/melt.nix";
outputs = { self, nixpkgs, flake-utils, melt }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (final: prev: melt.packages.${system}) ];
};
flakePkgs = rec {
ablego = pkgs.callPackage ./. {
inherit (melt.legacyPackages.${system}) mkSilverBin;
};
};
in rec {
defaultPackage = packages.ablego;
packages = flake-utils.lib.flattenTree flakePkgs;
devShell = pkgs.mkShell { inputsFrom = with packages; [ ablego ]; };
});
}

View File

@ -0,0 +1,11 @@
function main
IOVal<Integer> ::= args::[String] ioIn::IOToken
{
local fileName :: String = head(args);
local result :: IO<Integer> = do {
return 123;
};
return evalIO(result, ioIn);
}