-
Notifications
You must be signed in to change notification settings - Fork 2
/
lakefile.lean
38 lines (29 loc) · 954 Bytes
/
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
/-
Copyright © 2023-2024 François G. Dorais. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-/
import Lake
open Lake DSL
package UnicodeBasic
@[default_target]
lean_lib UnicodeBasic
lean_lib UnicodeData {
precompileModules := true
}
lean_exe lookup
lean_exe makeTables
@[test_driver]
lean_exe testTables
-- Download datafile from the Unicode Character Database (UCD)
script downloadUCD (args) do
let dir : FilePath := "./data"
let url := "https://www.unicode.org/Public/UCD/latest/ucd/"
let mut err : ExitCode := 0
for file in args do
IO.print s!"Downloading UCD/{file} ... "
match ← download (url ++ file) (dir/file) |>.run with
| .ok _ _ => IO.println "Done."
| .error _ _ => IO.println "Failed!"; err := err + 1
return err
-- Update data files from the Unicode Character Database (UCD)
script updateUCD do downloadUCD ["ReadMe.txt", "UnicodeData.txt", "PropList.txt"]