forked from Verified-zkEVM/ArkLib
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlakefile.lean
More file actions
67 lines (53 loc) · 2.18 KB
/
Copy pathlakefile.lean
File metadata and controls
67 lines (53 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import Lake
open Lake DSL
/-! # Lake configuration for ArkLib
Many of these configs are taken from mathlib
-/
/-! ## Dependencies on upstream projects -/
require VCVio from git "https://github.com/dtumad/VCV-io.git" @ "v4.21.0-rc3"
-- don't need to specify this, since VCV already imports mathlib
-- require mathlib from git "https://github.com/leanprover-community/mathlib4.git"
require «doc-gen4» from git "https://github.com/leanprover/doc-gen4" @ "v4.21.0-rc3"
require checkdecls from git "https://github.com/PatrickMassot/checkdecls.git" @ "lean4.18.0"
-- Dependent rewrite tactic
require seq from git "https://github.com/Vtec234/lean4-seq.git"
-- meta if get_config? env = some "dev" then
/-- These options are used
* as `leanOptions`, prefixed by `` `weak``, so that `lake build` uses them;
* as `moreServerArgs`, to set their default value in arklib
(as well as `Archive`, `Counterexamples` and `test`).
-/
abbrev arklibOnlyLinters : Array LeanOption := #[
-- ⟨`linter.docPrime, true⟩,
⟨`linter.hashCommand, true⟩,
⟨`linter.oldObtain, true,⟩,
-- ⟨`linter.refine, true⟩,
⟨`linter.style.cdot, true⟩,
⟨`linter.style.dollarSyntax, true⟩,
⟨`linter.style.lambdaSyntax, true⟩,
⟨`linter.style.longLine, true⟩,
⟨`linter.style.longFile, .ofNat 1500⟩,
⟨`linter.style.missingEnd, true⟩,
⟨`linter.style.setOption, true⟩
]
/-- These options are passed as `leanOptions` to building arklib, as well as the
`Archive` and `Counterexamples`. (`tests` omits the first two options.) -/
abbrev arklibLeanOptions := #[
⟨`pp.unicode.fun, true⟩, -- pretty-prints `fun a ↦ b`
⟨`autoImplicit, false⟩
] ++ -- options that are used in `lake build`
arklibOnlyLinters.map fun s ↦ { s with name := `weak ++ s.name }
def moreServerArgs := #[
"-Dpp.unicode.fun=true", -- pretty-prints `fun a ↦ b`
"-DAutoImplicit=false"
]
package «Arklib» {
-- add any package configuration options here
leanOptions := arklibLeanOptions
-- Mathlib also enforces these linter options, which are not active by default.
moreServerOptions := arklibOnlyLinters
}
@[default_target]
lean_lib «ArkLib» {
-- add any library configuration options here
}