generated from srid/haskell-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
34 lines (26 loc) · 1.12 KB
/
justfile
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
default:
@just --list
# Run hoogle
docs:
echo http://127.0.0.1:8888
hoogle serve -p 8888 --local
# Run cabal repl
repl *ARGS:
cabal repl {{ARGS}}
# Autoformat the project tree
fmt:
treefmt
# Run ghcid -- auto-recompile and run `main` function
run:
ghcid -c "cabal v2-repl exe:converter" --warnings -T :main
run-parser:
ghcid -c "cabal v2-repl templatespiler-parser:exe:parser-exe" --warnings -T :main --restart=test.tmpspl
run-parser-tests:
ghcid -c "cabal v2-repl parser:test:test" --warnings
run-converter:
ghcid -c "cabal v2-repl templatespiler-converter:exe:converter" --warnings -T :main --restart=test.tmpspl
bnfc:
rm -rf templatespiler-bnf/src
bnfc --haskell --text-token --functor --generic -d -p Language -o templatespiler-bnf/src templatespiler.cf
mv templatespiler-bnf/src/Language/Templatespiler/Test.hs templatespiler-bnf/src/Main.hs # stupid dumb hack to make cabal work
find templatespiler-bnf -name "*.hs" -exec sed -i "1s/^/{- HLINT ignore -}\n{- FOURMOLU_DISABLE -}\n/" {} + # stupid dumb hack to make hlint and fourmolu work (we just skip them for generated code)