-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
52 lines (43 loc) · 1.22 KB
/
BUILD.bazel
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
# Set all target’s visibility in this package to "public".
package(default_visibility = ["//visibility:public"])
load(
"@rules_haskell//haskell:defs.bzl",
"haskell_toolchain_library",
"haskell_library",
"haskell_binary",
"haskell_repl",
)
STACK_DEPS = ["array", "base", "text", "containers",
"parallel", "extra", "directory", "unix", "random",
"attoparsec", "mtl", "MemoTrie"]
DEPS = ["@stackage//:{}".format(i) for i in STACK_DEPS]
EXTENSIONS = ["-XOverloadedStrings", "-XTupleSections", "-XMultiWayIf", "-XLambdaCase"]
haskell_library(
name = "Commons",
srcs = [":Commons.hs", ":Algorithms.hs"],
deps = DEPS,
ghcopts = EXTENSIONS,
)
haskell_repl(
name = "hie-bios",
collect_data = False,
deps = DEPS + [":Commons"],
)
haskell_binary(
name = "newday",
srcs = [":Scaffolding.hs"],
deps = DEPS,
data = ["//deps:DayTemplate.hs"],
ghcopts = EXTENSIONS,
)
DAYS = 25
[haskell_binary(
name = "d{}".format(day + 1),
srcs = ["Day{}.hs".format(day + 1)],
deps = DEPS + [":Commons"],
ghcopts = EXTENSIONS,
data = [
"//:inputs/{}/test.txt".format(day + 1),
"//:inputs/{}/input.txt".format(day + 1),
],
) for day in range(DAYS)]