forked from kbuzzard/FilterGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lakefile.lean
65 lines (49 loc) · 2.06 KB
/
lakefile.lean
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
import Lake
open Lake DSL
-- Using this assumes that each dependency has a tag of the form `v4.X.0`.
def leanVersion : String := s!"v{Lean.versionString}"
def LocalGameServer : Dependency := {
name := `GameServer
src := Source.path "../lean4game/server"
}
def RemoteGameServer : Dependency := {
name := `GameServer
src := Source.git "https://github.com/leanprover-community/lean4game.git" leanVersion "server"
}
/- Choose GameServer dependency depending on the environment variable `LEAN4GAME`. -/
open Lean in
#eval (do
let gameServerName := if get_config? lean4game.local |>.isSome then
``LocalGameServer else ``RemoteGameServer
modifyEnv (fun env => Lake.packageDepAttr.ext.addEntry env gameServerName)
: Elab.Command.CommandElabM Unit)
/-! # USER SECTION
Below are all the dependencies the game needs. Add or remove packages here as you need them.
Note: If your package (like `mathlib` or `Std`) has tags of the form `v4.X.0` then
you can use `require mathlib from git "[URL]" @ leanVersion`
-/
require mathlib from git "https://github.com/leanprover-community/mathlib4.git" @ "v4.7.0"
/-! # END USER SECTION -/
-- NOTE: We abuse the `trace.debug` option to toggle messages in VSCode on and
-- off when calling `lake build`. Ideally there would be a better way using `logInfo` and
-- an option like `lean4game.verbose`.
package Game where
moreLeanArgs := #[
"-Dtactic.hygienic=false",
"-Dlinter.unusedVariables.funArgs=false",
"-Dtrace.debug=false",
"-Dpp.unicode.fun=true", -- pretty-prints `fun a ↦ b`
"-DautoImplicit=false", -- switch off auto-implicit
"-DrelaxedAutoImplicit=false"] -- switch off relaxed auto-implicit
moreServerOptions := #[
⟨`tactic.hygienic, false⟩,
⟨`linter.unusedVariables.funArgs, true⟩,
⟨`trace.debug, true⟩]
weakLeanArgs := #[]
leanOptions := #[
⟨`pp.unicode.fun, true⟩, -- pretty-prints `fun a ↦ b`
⟨`autoImplicit, false⟩, -- switch off auto-implicit
⟨`relaxedAutoImplicit, false⟩ -- switch off relaxed auto-implicit
]
@[default_target]
lean_lib Game