Skip to content

Commit

Permalink
feat: Add happy-arbitrary to the stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 9, 2024
1 parent b6801c6 commit 60b6095
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
[submodule "hs-github-tools"]
path = hs-github-tools
url = https://github.com/TokTok/hs-github-tools
[submodule "hs-happy-arbitrary"]
path = hs-happy-arbitrary
url = https://github.com/TokTok/hs-happy-arbitrary
[submodule "hs-msgpack-arbitrary"]
path = hs-msgpack-arbitrary
url = https://github.com/TokTok/hs-msgpack-arbitrary
Expand Down
9 changes: 8 additions & 1 deletion .hie-bios
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import re
import subprocess
import sys


def skip(line: str) -> bool:
# Ignore linker flags (don't need them for HLS).
# Ignore preprocessor defines (they can differ per project).
return line.startswith("-l") or line.startswith("-D")


if "--regenerate" in sys.argv:
subprocess.run(["tools/haskell/gen_haskell_targets"], check=True)
subprocess.run(["bazel", "build", "//tools/haskell:hie-bios@bios"], check=True)
Expand All @@ -28,7 +35,7 @@ with open(os.environ["HIE_BIOS_OUTPUT"], "w") as fh:
"/src/workspace/",
line,
)
if line != prev and not line.startswith("-l"):
if line != prev and not skip(line):
fh.write(line)
prev = line
# Make warnings non-fatal
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles
1 change: 1 addition & 0 deletions ghc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ with (import <nixpkgs> { });
exceptions
expiring-cache-map
extra
file-embed
filepath
generic-arbitrary
github
Expand Down
2 changes: 1 addition & 1 deletion hs-apigen
Submodule hs-apigen updated 2 files
+54 −50 tools/apigen.py
+556 −75 tools/gen-python
2 changes: 1 addition & 1 deletion hs-github-tools
1 change: 1 addition & 0 deletions hs-happy-arbitrary
Submodule hs-happy-arbitrary added at f5e40a
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages:
- hs-apigen/
- hs-cimple/
- hs-github-tools/
- hs-happy-arbitrary/
- hs-msgpack-arbitrary/
- hs-msgpack-binary/
- hs-msgpack-rpc-conduit/
Expand Down
1 change: 1 addition & 0 deletions third_party/haskell/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ licenses(["notice"])
"exceptions",
"expiring-cache-map",
"extra",
"file-embed",
"filepath",
"generic-arbitrary",
"github",
Expand Down
2 changes: 1 addition & 1 deletion tools/.github
Submodule .github updated 1 files
+4 −0 .github/mergeable.yml
1 change: 1 addition & 0 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ workspace(projects = [
"hs-apigen",
"hs-cimple",
"hs-github-tools",
"hs-happy-arbitrary",
"hs-msgpack-arbitrary",
"hs-msgpack-binary",
"hs-msgpack-rpc-conduit",
Expand Down
1 change: 1 addition & 0 deletions tools/built/src/Dockerfile.haskell
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN cmake -Bc-toxcore/_build -Hc-toxcore -GNinja -DBOOTSTRAP_DAEMON=OFF -DCMAKE_
COPY --chown=builder:users hs-apigen/ /work/hs-apigen/
COPY --chown=builder:users hs-cimple/ /work/hs-cimple/
COPY --chown=builder:users hs-github-tools/ /work/hs-github-tools/
COPY --chown=builder:users hs-happy-arbitrary/ /work/hs-happy-arbitrary/
COPY --chown=builder:users hs-msgpack-arbitrary/ /work/hs-msgpack-arbitrary/
COPY --chown=builder:users hs-msgpack-binary/ /work/hs-msgpack-binary/
COPY --chown=builder:users hs-msgpack-rpc-conduit/ /work/hs-msgpack-rpc-conduit/
Expand Down
1 change: 1 addition & 0 deletions tools/built/src/home/.config/home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
nnoremap <C-l> :noh<CR><C-l>
map Q gqap
au BufEnter *.x,*.y set ts=8 sw=8 noexpandtab
au BufEnter BUILD.* set ft=bzl
au FileType sh,javascript set ts=2 sw=2
au FileType go set noexpandtab
Expand Down
4 changes: 4 additions & 0 deletions tools/git-remotes
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ our %REPOS = (
upstream => 'toktok',
repo 'iphydf',
}],
'hs-happy-arbitrary' => ['hs-happy-arbitrary', {
upstream => 'toktok',
repo 'iphydf',
}],
'hs-msgpack-arbitrary' => ['hs-msgpack-arbitrary', {
upstream => 'toktok',
repo 'iphydf',
Expand Down
2 changes: 2 additions & 0 deletions tools/haskell/haskell_targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ HASKELL_TARGETS = [
"//hs-github-tools:github-events",
"//hs-github-tools:hs-github-tools",
"//hs-github-tools:testsuite",
"//hs-happy-arbitrary:hs-happy-arbitrary",
"//hs-happy-arbitrary:testsuite",
"//hs-msgpack-arbitrary:hs-msgpack-arbitrary",
"//hs-msgpack-arbitrary:testsuite",
"//hs-msgpack-binary:hs-msgpack-binary",
Expand Down

0 comments on commit 60b6095

Please sign in to comment.