Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LSpec/Instances.lean
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ instance Nat.Testable_forall_lt
| none => s!"Fails on input {b}."
| .isFailure msg => .isFailure msg
| .isMaybe msg => .isMaybe msg
| .isFalse h msg => .isFalse (λ h' => h λ n hn => h' _ (Nat.le_step hn)) msg
| .isFalse h msg => .isFalse (λ h' => h λ n hn => h' _ (Nat.le_succ_of_le hn)) msg
| .isFailure msg => .isFailure msg

end LSpec
2 changes: 1 addition & 1 deletion LSpec/LSpec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def withExceptError (descr : String) (exc : Except ε α) [ToString α]

/-- A generic runner for `TestSeq` -/
def TestSeq.run (tSeq : TestSeq) (indent := 0) : Bool × String :=
let pad := String.mk $ List.replicate indent ' '
let pad := String.ofList $ List.replicate indent ' '
let rec aux (acc : String) : TestSeq → Bool × String
| .done => (true, acc)
| .group d ts n =>
Expand Down
7 changes: 4 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs = {
nixpkgs.follows = "lean4-nix/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
lean4-nix.url = "github:lenianiva/lean4-nix";
lean4-nix.url = "github:lenianiva/lean4-nix/manifest/v4.26.0";
Comment thread
quinn-dougherty marked this conversation as resolved.
Outdated
};

outputs = inputs @ {
Expand All @@ -26,19 +26,22 @@
pkgs,
self',
config,
lib,
Comment thread
quinn-dougherty marked this conversation as resolved.
Outdated
...
}: {
}: let lake2nix = pkgs.callPackage lean4-nix.lake {};
in {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [(lean4-nix.readToolchainFile ./lean-toolchain)];
};

# Build the library with `nix build`
packages.default =
((lean4-nix.lake {inherit pkgs;}).mkPackage {
lake2nix.mkPackage {
name = "LSpec";
src = ./.;
roots = ["LSpec"];
Comment thread
quinn-dougherty marked this conversation as resolved.
Outdated
}).modRoot;
};

devShells.default = pkgs.mkShell {
packages = with pkgs.lean; [lean-all];
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.24.0
leanprover/lean4:v4.26.0