chore: Version 0.3 #136
|
@ -26,6 +26,8 @@ protected def Info.stx? : Info → Option Syntax
|
||||||
| .ofFVarAliasInfo _ => none
|
| .ofFVarAliasInfo _ => none
|
||||||
| .ofFieldRedeclInfo info => info.stx
|
| .ofFieldRedeclInfo info => info.stx
|
||||||
| .ofOmissionInfo info => info.stx
|
| .ofOmissionInfo info => info.stx
|
||||||
|
| .ofChoiceInfo info => info.stx
|
||||||
|
| .ofPartialTermInfo info => info.stx
|
||||||
/-- Is the `Syntax` for this `Lean.Elab.Info` original, or synthetic? -/
|
/-- Is the `Syntax` for this `Lean.Elab.Info` original, or synthetic? -/
|
||||||
protected def Info.isOriginal (i : Info) : Bool :=
|
protected def Info.isOriginal (i : Info) : Bool :=
|
||||||
match i.stx? with
|
match i.stx? with
|
||||||
|
@ -141,6 +143,8 @@ partial def InfoTree.toString (t : InfoTree) (ctx?: Option Elab.ContextInfo := .
|
||||||
| .ofFVarAliasInfo _ => pure "[fvar]"
|
| .ofFVarAliasInfo _ => pure "[fvar]"
|
||||||
| .ofFieldRedeclInfo _ => pure "[field_redecl]"
|
| .ofFieldRedeclInfo _ => pure "[field_redecl]"
|
||||||
| .ofOmissionInfo _ => pure "[omission]"
|
| .ofOmissionInfo _ => pure "[omission]"
|
||||||
|
| .ofChoiceInfo _ => pure "[choice]"
|
||||||
|
| .ofPartialTermInfo _ => pure "[partial_term]"
|
||||||
let children := "\n".intercalate (← children.toList.mapM λ t' => do pure $ indent $ ← t'.toString ctx)
|
let children := "\n".intercalate (← children.toList.mapM λ t' => do pure $ indent $ ← t'.toString ctx)
|
||||||
return s!"{node}\n{children}"
|
return s!"{node}\n{children}"
|
||||||
else throw <| IO.userError "No `ContextInfo` available."
|
else throw <| IO.userError "No `ContextInfo` available."
|
||||||
|
|
|
@ -40,7 +40,7 @@ def «have» (mvarId: MVarId) (binderName: Name) (type: Expr): MetaM BranchResul
|
||||||
let fvarId ← mkFreshFVarId
|
let fvarId ← mkFreshFVarId
|
||||||
let lctxUpstream := lctx.mkLocalDecl fvarId binderName type
|
let lctxUpstream := lctx.mkLocalDecl fvarId binderName type
|
||||||
let mvarUpstream ←
|
let mvarUpstream ←
|
||||||
withTheReader Meta.Context (fun ctx => { ctx with lctx := lctxUpstream }) do
|
Meta.withLCtx lctxUpstream #[] do
|
||||||
Meta.withNewLocalInstances #[.fvar fvarId] 0 do
|
Meta.withNewLocalInstances #[.fvar fvarId] 0 do
|
||||||
let mvarUpstream ← mkUpstreamMVar mvarId
|
let mvarUpstream ← mkUpstreamMVar mvarId
|
||||||
--let expr: Expr := .app (.lam binderName type mvarBranch .default) mvarUpstream
|
--let expr: Expr := .app (.lam binderName type mvarBranch .default) mvarUpstream
|
||||||
|
|
|
@ -42,16 +42,15 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733351931,
|
"lastModified": 1736388194,
|
||||||
"narHash": "sha256-ngMjY/ci6490G2gofaS9CODtpnmFoYzfaI13U14TkFM=",
|
"narHash": "sha256-ymSrd/A8Pw+9FzbxUbR7CkFHLJK1b4SnFFWg/1e0JeE=",
|
||||||
"owner": "lenianiva",
|
"owner": "lenianiva",
|
||||||
"repo": "lean4-nix",
|
"repo": "lean4-nix",
|
||||||
"rev": "157c85903f668fadeb79f330961b7bbe5ee596de",
|
"rev": "90f496bc0694fb97bdfa6adedfc2dc2c841a4cf2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "lenianiva",
|
"owner": "lenianiva",
|
||||||
"ref": "157c85903f668fadeb79f330961b7bbe5ee596de",
|
|
||||||
"repo": "lean4-nix",
|
"repo": "lean4-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -4,7 +4,7 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
lean4-nix.url = "github:lenianiva/lean4-nix?ref=157c85903f668fadeb79f330961b7bbe5ee596de";
|
lean4-nix.url = "github:lenianiva/lean4-nix";
|
||||||
lspec = {
|
lspec = {
|
||||||
url = "github:argumentcomputer/LSpec?ref=504a8cecf8da601b9466ac727aebb6b511aae4ab";
|
url = "github:argumentcomputer/LSpec?ref=504a8cecf8da601b9466ac727aebb6b511aae4ab";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -18,19 +18,9 @@
|
||||||
lean4-nix,
|
lean4-nix,
|
||||||
lspec,
|
lspec,
|
||||||
...
|
...
|
||||||
} : flake-parts.lib.mkFlake { inherit inputs; } {
|
}:
|
||||||
flake = {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
};
|
flake = {
|
||||||
systems = [
|
|
||||||
"aarch64-linux"
|
|
||||||
"aarch64-darwin"
|
|
||||||
"x86_64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
];
|
|
||||||
perSystem = { system, pkgs, ... }: let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
overlays = [ (lean4-nix.readToolchainFile ./lean-toolchain) ];
|
|
||||||
};
|
};
|
||||||
systems = [
|
systems = [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -94,7 +84,6 @@
|
||||||
inherit (repl) executable;
|
inherit (repl) executable;
|
||||||
default = repl.executable;
|
default = repl.executable;
|
||||||
};
|
};
|
||||||
formatter = pkgs.alejandra;
|
|
||||||
legacyPackages = {
|
legacyPackages = {
|
||||||
inherit project;
|
inherit project;
|
||||||
leanPkgs = pkgs.lean;
|
leanPkgs = pkgs.lean;
|
||||||
|
@ -108,6 +97,7 @@
|
||||||
${test.executable}/bin/test > $out
|
${test.executable}/bin/test > $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = [pkgs.lean.lean-all pkgs.lean.lean];
|
buildInputs = [pkgs.lean.lean-all pkgs.lean.lean];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
leanprover/lean4:v4.14.0
|
leanprover/lean4:v4.15.0
|
||||||
|
|
Loading…
Reference in New Issue